Mod rewrite 为什么我的一些修改规则不起作用?

Mod rewrite 为什么我的一些修改规则不起作用?,mod-rewrite,apache2,Mod Rewrite,Apache2,这是我的.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

这是我的.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>
它应该像网站的其他部分一样工作

我错过了什么


谢谢

我不知道为什么下面的内容解决了我的问题,但它解决了。就这个问题:

我禁用了mod_协商,一切都开始工作了

如果有人能解释为什么和/或本模块的功能,我将不胜感激

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