AD0-E724 · Question #64
A developer is investigating the 'url_rewrite' database table. What is the primary purpose of the 'redirect_type' column in this table?
The correct answer is D. It specifies the HTTP redirect code (e.g., 301 or 302) to be used, or 0 if it is a rewrite.. Option D is correct because the redirect_type column in url_rewrite controls HTTP behavior at the response level: a value of 301 signals a permanent redirect, 302 signals a temporary redirect, and 0 means no redirect at all - the URL is simply rewritten internally without the bro
Question
A developer is investigating the 'url_rewrite' database table. What is the primary purpose of the 'redirect_type' column in this table?
Options
- AIt defines whether the rewrite applies to the 'frontend' or 'adminhtml' area.
- BIt stores the entity type, such as 'product' or 'category'.
- CIt stores the ID of the store view for which the rewrite is active.
- DIt specifies the HTTP redirect code (e.g., 301 or 302) to be used, or 0 if it is a rewrite.
How the community answered
(26 responses)- A4% (1)
- B4% (1)
- C4% (1)
- D88% (23)
Explanation
Option D is correct because the redirect_type column in url_rewrite controls HTTP behavior at the response level: a value of 301 signals a permanent redirect, 302 signals a temporary redirect, and 0 means no redirect at all - the URL is simply rewritten internally without the browser being notified (a transparent rewrite).
- A is wrong - the request scope (frontend vs. adminhtml) is handled by a separate
store_idand routing context, not byredirect_type. - B is wrong - the entity type (product, category, CMS page) is stored in the
entity_typecolumn, not inredirect_type. - C is wrong - the store view association is handled by the
store_idcolumn, which is a foreign key to the store table.
Memory tip: Think of redirect_type as the HTTP status code field - if you've ever configured a 301 redirect in an .htaccess file, this column does the same job, but inside the database. The value 0 is the special case meaning "rewrite only, no redirect."
Topics
Community Discussion
No community discussion yet for this question.