Announcement Announcement Module
Collapse
No announcement yet.
301 URL Redirect from Dynamic to Static Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 301 URL Redirect from Dynamic to Static

    We may have to redirect some dynamic urls to static urls. Please find an example url below that needs to be redirected to a static one;

    http://www.exampledomain.com/page.html?id=32 to http://www.exampledomain.com/en/page...icpage-32.html

    In this instance we can use the below rule to successfully redirect the url;

    RewriteCond %{QUERY_STRING} ^id=32$
    RewriteRule ^page\.html$ http://www.exampledomain.com/en/page...cpage-32.html? [R=301,L]

    Here in the above example, there is an 'id'. It may be different in our url, but we can make changes in the above rule depending how our url looks like. For example, it might say page.php?page_num=32 or something to that effect. Then you just replace id=32 with page_num=32 in the redirect code.
Tag Cloud Tag Cloud Module
Collapse
Working...
X