Forum Moderators: phranque

Message Too Old, No Replies

RedirectMatch Question

Part two of this problem...

         

BillyS

2:54 pm on Nov 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I used to have sections that were of the type:

www.sitename.com/Section/7/0/
www.sitename.com/Section/7/14/
www.sitename.com/Section/7/21/

I've consolidated these into one page:

www.sitename.com/Section/

I'm already using this in robots.txt

Disallow: /Section/7/

There are also maney pages with this type URL (that are useful pages - I want to keep these):

www.sitename.com/Section/Name-of-the-Page/

I was thinking about telling the SE that these pages are gone. There are no longer any links to these pages. Is this what I put in .htaccess?

RedirectMatch 410 /Section/7/

jdMorgan

3:30 pm on Nov 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Since RedirectMatch uses regular expressions, you may want to start-anchor the pattern:

RedirectMatch 410 ^/Section/7/

Jim

BillyS

4:07 pm on Nov 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks!

BillyS

4:30 pm on Nov 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I just tried this, but it does not seem to be working the way I need it to.

I used this code:

RedirectMatch 404 ^/Section/6/

And this worked perfectly for searches to:

www.sitename.com/Section/6/

But it didn't work for this...

www.sitename.com/Section/6/12/

jdMorgan

4:39 pm on Nov 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Did you flush your browser cache before testing?

If not, try that first.

Otherwise, you could try adding ".*" to the end of the pattern, but since the pattern is not end-anchored, this should not be required.

Jim

BillyS

7:56 pm on Nov 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My bad on this one, it's working. I verified by using a tool that checks headers. Thanks again.