- Joined
- Jul 9, 2006
- Messages
- 3,026
- Reaction score
- 26
Been beating my head against the wall trying to get some 301 redirects to work.
Trying to get:
etc
That's where I am at. Any help would be appreciated!
Trying to get:
Code:
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]
That's where I am at. Any help would be appreciated!