- Impact
- 152
Been beating my head against the wall trying to get some 301 redirects to work.
Trying to get:
www.example.ca/index.php?name=News&file=article&sid=1
www.example.ca/index.php?name=News&file=article&sid=150
to 301 to
www.example.ca/article-title/
www.example.ca/different-title/
etc
The above is where I am at now.
~ Thanks
Trying to get:
www.example.ca/index.php?name=News&file=article&sid=1
www.example.ca/index.php?name=News&file=article&sid=150
to 301 to
www.example.ca/article-title/
www.example.ca/different-title/
etc
Code:
RewriteCond %{HTTP_HOST} ^www\.example\.ca$ [NC]
RewriteCond %{QUERY_STRING} ^name=News&file=article&sid=1(&.*)?$ [NC]
RewriteRule ^index\.php$ http://www.example.ca/article-title/?%1 [R=301,NE,NC,L]
RewriteCond %{HTTP_HOST} ^www\.example\.ca$ [NC]
RewriteCond %{QUERY_STRING} ^name=News&file=article&sid=150(&.*)?$ [NC]
RewriteRule ^index\.php$ http://www.example.ca/different-title/?%1 [R=301,NE,NC,L]
The above is where I am at now.
~ Thanks