We built a new webshop for one of our clients, and are 301 redirecting their old url's to our normal ones. As usual we do this using .htaccess as follows:
Redirect 301 /url1/ http://www.url2.com/
and it works fine.
BUT the old shop has this querystring with slashes in it (!) , for example:
/epages/14353.sf/de_DE/?ObjectPath=/Shops/61922345/Products/32428
And as soon as I use this in a htaccess 301 redirect string it stops working. I don't get a 500 error or something like that, but when I visit /epages/14353.sf/de_DE/?ObjectPath=/Shops/61922345/Products/32428
it won't redirect. If I would use it with a querystring like the following (/epages/14353.sf/de_DE/?ObjectPath=foobar
) I can visit it and get redirected, but not if there's a slash in it.
I tried backslashing it, encoding etc. but without the right results. Does any1 have an idea? I tried AllowEncodedSlashes On
but it gave me a 500 error.
Redirect
directive doesn't match the query string at all. Are you sure you don't have something else that's causing this problem? – Jon Lin Oct 12 '15 at 15:54Redirect 301 /epages/14353.sf/de_DE/?ObjectPath=/Shops/61922345/Products/32428 https://www.nu.nl
This is the only thing in the file. The old shop is gone, it's just a htaccess file, with one rule. – Hans Wassink Oct 13 '15 at 7:44