if robots.txt non exist it mupping on robots.php, but if exist -return robots.txt
RewriteEngine on
RewriteCond %{robots.txt} !-f [NC]
RewriteRule robots.txt 开发者_JS百科robots.php [L]
this code always return robots.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/robots\.txt/$ robots.php [L]
Think that's what you need...
精彩评论