0
這裏是我的.htaccess代碼的.htaccess和robots.txt的重寫URL如何
RewriteEngine on
RewriteRule (.*) index.html
問題:當訪問mydomain.com/robots.txt然後再次頁面重定向到index.html的
要求:
if(url contain robots.txt) Then
redirect to mydomain.com/robots.txt
else
redirect to index.html
你能給我你的聯繫方式,臉書,Skype或任何電子郵件。 –
%{REQUEST_URI}和RewriteCond –
@Wasim的含義基本上,RewriteCond就像是在說「if CONDITION then」。 REQUEST_URI是實際傳遞的URI:http://domain.tld/robots.txt。看看:http://httpd.apache.org/docs/current/mod/mod_rewrite.html –