1

我正在尝试使用 url rewrite (apache) 更改一些 url,但没有任何效果,我只是不明白为什么。这是我的 .htaccess 文件:

    RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mywebsite.it [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mywebsite.it [NC]
RewriteCond %{HTTP_REFERER} !^http://websiteip [NC]
RewriteRule ^.*$ http://www.mywebsite.it/ [R,L]
ErrorDocument 404 /404.php
RewriteRule ^home$ /t01/index.php [L]
RewriteRule ^chi-siamo$ /t01/chisiamo.php [L]
RewriteRule ^faq$ /t01/faq.php [L]
RewriteRule ^login$ /t01/login_splash.php [L]
RewriteRule ^logout$ /t01/logout.php [L]

There is t01/ in front of the files because I'm trying to see if it works in a subfolder. 
4

1 回答 1

1

我通过将文件放在主目录中并清除我的规则(不再是 t01/ )解决了所有问题。

于 2012-10-08T19:09:37.117 回答