开发者

mapping non exist file

开发者 https://www.devze.com 2023-03-01 22:37 出处:网络
if robots.txt non exist it mupping on robots.php, but if exist -return robots.txt RewriteEngine on RewriteCond %{robots.txt} !-f [NC]

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...

0

精彩评论

暂无评论...
验证码 换一张
取 消