I’ve spent so much time the last few days trying to work out some redirects.
I can do regular ones.. and indeed normal query string ones, where there is an index.php present in the url.
However, this url will not respond
http://www.bodysilk.co.uk/salon-products/dr-belter?category_id=6&page=shop.browse&limit=5&limitstart=0
I’ve tried detecting it with this, which is borrowing from another re-write which works ok… but does have an index.php in the non-sef url:
RewriteCond %{QUERY_STRING} ^page=shop.browse
RewriteRule ^index\.php$ http://www.bodysilk.co.uk/products/$1 [R=301,L]
How can I get it to act on the redirect? I have over 600 urls, which all have their own random unfriendly urls, and whilst I’m prety sure I can’t redirect them all to their SEF equivalents, it would be good to at least forward them all on to the shop homepage or something? I’m sure google is hurting us a bit for the 600 404 errors in web master tools
If anyone can show me the way to do it… It would make my day as I’m pulling my hair out! None of the examples I try work!
You have issues here in RewriteCond matching. Instead of:
It should be:
Additionally your RewriteRule is also not correct looking at your example URL:
Currently you have:
Which means your source URI has to be
/index.phponly with optional Query String.I will suggest you to explain your requirement clearly so that you can better help.