Forum Moderators: phranque
redirect 301 /old.htm [site.com...]
The page will redirect but I get this added to the end of the url: ?cPath=50
Any help is greatly appreciated.
You'll need the [R=301,L] flags.
The target URL in the rule has to have a question mark appended if you want to suppress parameters from being re-appended.
If the requested URL contains parameters, you might also need to look at QUERY_STRING by using a preceding RewriteCond as well.
RewriteCond %{QUERY_STRING} cPath=50
RewriteRule /teak-wood-furniture-c50/ [maxoutdoorliving.com...] [R=301,L]
Old - [testsite.com...]
New (trying to redirect) - [testsite.com...]
Any ideas?
# Remove query string from specific requested URL-path
RewriteCond %{QUERY_STRING} &?cPath=50&?
RewriteRule ^teak-wood-furniture-c50/$ http://www.example.com/teak-wood-furniture-c50/? [R=301,L]