View Full Version : Why won't this redirect work?
My site was located in a sub-directory named catalog. I have moved it to the root but google has a few thousand links to the sub-directory. I tried the following to redirect those but it doesn't work. Would someone please point out what I am doing wrong?RedirectMatch 301 https://www.mysite.com/catalog(.*)$ https://www.mysite.com/$1
Give this a try.
RedirectMatch catalog/(.*)\/?$ https://www.mysite.com/$1
Thank you. That worked perfectly as for redirecting the links. But does that redirect return a 301 to the search engines? I thought that had to be stated in the line of code.
Christian
10-06-06, 03:55 AM
What happens if you use this:
RedirectMatch permanent catalog/(.*)\/?$ https://www.mysite.com/$1
I gave that a try but it doesn't work. A 404 page is displayed instead of being redirected as before.
In case anyone sees this and has the same problem later on, the first syntax is correct. I checked the header and it is returning a 301. That must be part of that function.
vBulletin® v3.6.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.