Apache Modrewrite & 301 redirect- Dynamic URLs with characters.
- by Ben Chesters
I've been trying for weeks, literally, to rename these URLs and also ensure the old one is 301 redirected to the new one:
www.example.com/?mod=11&p=215 - www.example.com/clean-url-section
www.example.com/?mod=96&tab=6 - www.example.com/clean-url-section-2
Does anyone have any idea why I am having no luck, I got 500 server errors or nothing at all! Is it because of the question marks and characters? I'd be grateful for any help.
I have tried this (below) and it seems to be redirecting to the http:// www.example.com/new-page (this page doesn't exist, as I only want it to rename the page BUT use a 301 so that search engines continue you to value it)
RewriteCond %{query_string} mod=96&tab=6
RewriteRule (.*) http:// www. example.com/new-page? [R=301,L]
Scratching my head!