Moved gifs; Giving bots the message.

New to mod_rewrite? This is a good place to start.

Moved gifs; Giving bots the message.

Postby kewen » Sun Nov 07, 2004 5:03 am

Hi.

I've recently moved all gif's and jpe's to image files, now having only htm's and html's in the main folders.

I want to tell the robots including Google and Yahoo not to keep looking for these.

If I give them a 403, it seems they keep coming back looking for the files at some later point.

So I thought of redirecting them to a file (botdirections.html) that has

<meta name="robots" content="noindex,nofollow,noarchive">

only on it.

I am not sure how to do this in a local .htaccess file (one that will be in the folder where the gif's previously were)


I've got this far:


RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^.*bot.*$

(Here's where I want to tell the bot this only applies to .gif and jpe)

ReWriteRule ^ /botdirections\.html [L]

But I don't know how to tell the bot this only applies to .gif and .jpe


Thanks in advance for the help.


(I don't know if this will work, because I don't know if a bot will read meta
instructions on what will be a .html file, if it is seeking a .gif, but thought I would give it a try.)
kewen
 
Posts: 1
Joined: Sun Nov 07, 2004 4:40 am

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 118 guests

cron