D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] htaccess regex question

 

Hi Tom,

On Mon, Aug 20, 2007 at 05:26:48PM +0100, Tom Potts wrote:
> On Monday 20 August 2007 16:01, Andy Smith wrote:
> > I think you want:
> >
> > RedirectMatch permanent ^/gallery/.*$ /gallery2/main.php
> >
> > or:
> >
> > RedirectMatch gone ^/gallery/.*$

> The first think a bot should do when searching a web site is go get 
> www.website.dom/robots.txt  - this file tells the bot where it can and cannot 
> go - you dont want a bot running all your cgi-bin files etc...
> Its best to set this up to disallow everything and enable only those bits of 
> your site that are relatively permanent otherwise you'll be trying to 
> redirect every last page you ever write.
> .htaccess should be used for security and 'housekeeping' and should not be 
> used for fending of search engines

He's not trying to fend off a search engine as such, but to instruct
it that the material has been permanently removed and should
therefore be removed from its cache/results.

Also there is no way to do a redirect with .htaccess.

Technically the most correct thing to do would be to redirect to the
new location as one of the golden rules is that URLs should always
remain valid if possible.  But nobody's perfect. :)

Cheers,
Andy

-- 
http://bitfolk.com/ -- No-nonsense VPS hosting
Encrypted mail welcome - keyid 0x604DE5DB

Attachment: signature.asc
Description: Digital signature

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html