PDA

View Full Version : Why won't this redirect work?


patter
10-05-06, 09:48 AM
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

Nico
10-05-06, 10:13 AM
Give this a try.

RedirectMatch catalog/(.*)\/?$ https://www.mysite.com/$1

patter
10-05-06, 07:47 PM
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

patter
10-06-06, 09:08 PM
I gave that a try but it doesn't work. A 404 page is displayed instead of being redirected as before.

patter
10-11-06, 01:50 PM
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.