Forum Moderators: phranque

Message Too Old, No Replies

Need to give Google a mass of 410 responses

Searching has left me syntax challenged

         

Hoople

8:35 pm on Jul 29, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have removed a picture gallery and blog from a site. So all content in /pics/ and /blog/ is gone. What's been removed is a mix of files and folders. My feeling is the first one is the right syntax but I'm not sure about the other two.

Redirect gone /folder/.*
OR
Redirect gone /folder/*
OR
Redirect gone /folder/*.html
Redirect gone /folder/*.jpg

g1smd

8:54 pm on Jul 29, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



1. Trailing uncaptured .* is always redundant.

2. /* matches multiple contiguous slashes. Incorrect.

You need:

RewriteRule ^folder/ - [G]

lucy24

9:09 pm on Jul 29, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



... unless [httpd.apache.org] you really do insist on using mod_alias ;) in which case it's

Redirect 410 /folder
or
Redirect gone /folder

Either way, you don't need to give the rest of the url unless you're capturing it, which you're obviously not.