Go Back   cPanel Forums > cPanel® and WHM® (for Linux® and FreeBSD® Servers) > cPanel and WHM Discussions

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-25-2007, 11:35 AM
nat nat is offline
Registered User
 
Join Date: Jan 2003
Posts: 207
nat
Question How to use httpd alias to show a robots.txt file only if robots.txt does not exist.

Is it possible to use alias or somethign else in httpd to show a different file ONLY if the file does not exist?

Example:

1. I count more than 50 Slurp requests from many different IPs coming in just 5 seconds. From time to time it causes a high load.

2. ONLY for people who don't have a robots.txt file I want to setup an alias to slow slurp down just a little bit.

Alias /robots.txt /home/myserver/public_html/robots.txt

robots.txt on myserver contains:

User-agent: Slurp
Crawl-delay: 2

The above kills other peoples robots.txt file so that cannot be used.

3. For people who already have a robots.txt file, what is in their file is what should be used.



Right now I can only get it one way or the other. Does anyone know a way to get apache to show a file only if the person doesn't already have a file by the same name in their directory?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 06:14 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc