0

这是我的 .htaccess 文件:

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteRule ^es$ index.php?lang=es_ES [L]
RewriteRule ^pt$ index.php?lang=pt_BR [L]
RewriteRule ^en$ index.php?lang=en_US [L]

RewriteRule ^index.php index.php [L]

RewriteRule ^inicio$ index.php [L]
RewriteRule ^nosotros$ us.php [L]
RewriteRule ^portfolio$ portfolio-masonry.php [L]
RewriteRule ^contacto$ contact.php [L]

RewriteRule ^home$ index.php [L]
RewriteRule ^us$ us.php [L]
RewriteRule ^contact$ contact.php [L]

RewriteRule ^proyectos/([0-9]+)-([a-zA-Z0-9-]+)$ portfolio-single.php?id=$1 [NC,L]
RewriteRule ^projects/([0-9]+)-([a-zA-Z0-9-]+)$ portfolio-single.php?id=$1 [NC,L]

</IfModule>

这里是网站:http ://testing.fyrastudio.com/WEB_fyrastudio.com/v3/

一切都很好。但是如果您选择以英文查看网站,然后单击关于我们或联系方式,服务器会返回 404 not found 错误。但是根据这两条规则:

RewriteRule ^us$ us.php [L]
RewriteRule ^contact$ contact.php [L]

它应该像网站的其他部分一样工作!

我错过了什么?

谢谢

4

1 回答 1

0

我不知道为什么以下解决了我的问题,但确实如此。在这个问题之后:

mod_rewrite 表现不佳

我禁用了 mod_negotiation,一切都开始工作了......

如果有人能解释这个模块为什么和/或做什么,我将不胜感激。

于 2013-06-16T22:28:32.057 回答