| 7:49 pm on Jul 20, 2012 (gmt 0)|
For starters, if you removed the blog you should give them a 404 page, not a 301 redirect.
I would send all of these people to a custom 404 telling them the blog is gone and put a redirect in that page, either meta redirect for the browser or you could do a redirect in a PHP page.
Anyway, the proper way to redirect an entire folder would be a RewriteRule:
RewriteRule ^Foldername/.* http://www.example.com/ [R=301,L]
| 10:10 pm on Jul 20, 2012 (gmt 0)|
|you should give them a 404 page |
Could we compromise on 410 "It was here, but it's gone"?
| 10:36 pm on Jul 20, 2012 (gmt 0)|
The .* in that pattern is redundant and can be removed.
With a redirect in a PHP page any notice on that page would be unreadable.
If the content has gone, serve "410 Gone" with a human-readable message explaining what is going on.
| 11:06 pm on Jul 20, 2012 (gmt 0)|
True, 410 would probably be better but not necessarily used by all the lamer crawlers.
| 8:36 am on Jul 24, 2012 (gmt 0)|
I've used your inital code you gave me for the time being
and it's working fine.
I will look into the 404/410 thing - it's not something I normally have to bother with as it's very rare that i have a page that becomes redundant or is moved.
| 4:57 pm on Jul 24, 2012 (gmt 0)|
|not necessarily used by all the lamer crawlers |
Do we have to design for lame crawlers now? :(
The practical difference between 404 and 410 is that a 410 isn't automated-- that is, the server doesn't remember that some file was there for years and years and now it's gone. Heck, the server can't even remember someone it met two seconds ago :)
You can often double up and send humans to the same physical error page for both 404 and 410. They probably don't care whether the page used to exist, just that it isn't there now. That's assuming you're not dumping popular pages that people had bookmarked. But be sure you send humans somewhere. The default 410 page is scary.
| 5:38 pm on Jul 24, 2012 (gmt 0)|
Maybe I'll just put this on my tombstone:
"410 Gone but not forgotten"