Forum Moderators: phranque
I am a bit lost with this rewriterule.
http://www.example.com/index.php?s=3&cat_id=3_Shirts&artikel=3335_55DSL+Andrea+-+Pink+is+Punk&Search_Brand=55DSL&ref=2
should 301 redirect to
http://www.example.com/55dsl-andrea-pink-is-punk.html
I have tried with RewriteCond:
RewriteCond %{QUERY_STRING} ^s=3&cat_id=3_Shirts&artikel=3335_55DSL+Andrea+-+Pink+is+Punk&ref=2$
RewriteRule ^(.*)$ /55dsl-andrea-pink-is-punk.html? [L,R=301]
but it doesn't work. COuld anybody give me some help please. I appreciate it.
Because you said in your statement of requirements in the first post that you wanted to redirect from "index.php" with that specific query string appended to "/" with no query string. Would you want to permanently redirect your robots.txt or sitemap.xml to "/" just because someone tacked a query string onto that URL? Most likely not...
Make your patterns and rules as specific as possible. It's usually better to make them too specific and have to modify them to cast a wider net, than to make them insufficiently specific and have them unexpectedly affect all sort of URL requests.
Jim