Php .htaccess将/contact重定向到root public_html文件夹中的contact.png

Php .htaccess将/contact重定向到root public_html文件夹中的contact.png,php,apache,.htaccess,mod-rewrite,Php,Apache,.htaccess,Mod Rewrite,这是公用html文件夹根目录中的my.htaccess文件: RewriteEngine on RewriteCond %{HTTP_HOST} ^(www\.)?codeliger\.com$ [NC] RewriteCond %{THE_REQUEST} \s/(index\.php)?[\s?] [NC] RewriteRule ^ /home? [L,R] RewriteRule ^home/?$ /index.php?page=home [L] RewriteRule ^edit/?

这是公用html文件夹根目录中的my.htaccess文件:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?codeliger\.com$ [NC]
RewriteCond %{THE_REQUEST} \s/(index\.php)?[\s?] [NC]
RewriteRule ^ /home? [L,R]

RewriteRule ^home/?$ /index.php?page=home [L]
RewriteRule ^edit/?$ /index.php?page=edit [L]
RewriteRule ^education/?$ /index.php?page=home&filter=1 [L]
RewriteRule ^skills/?$ /index.php?page=home&filter=2 [L]
RewriteRule ^projects/?$ /index.php?page=home&filter=3 [L]
RewriteRule ^experience/?$ /index.php?page=home&filter=4 [L]
RewriteRule ^contact?/$ /index.php?page=contact [L]
这是我单击以进入我的联系人页面的链接:

<li><a href="http://codeliger.com/contact">Contact</a></li>

我怎样才能解决这个问题?

我想问题就在这里
RewriteRule^contact?/$/index.php?page=contact[L]

                                        ^
换行

RewriteRule ^contact?/$ /index.php?page=contact [L]


这很可能是由于存在

将此行添加到.htaccess的顶部:

Options -MultiViews

谢谢,一开始我没发现那个错误。但即使我改变了它,我仍然无法让它工作。我清除了浏览器缓存,图像仍然显示。你在根目录中有contact.png文件吗?我将页面重命名为form,并将HTACCESS更改为form,它可以工作,但当我导航到codeliger.com/contact时,它仍然会转到图像!!!太令人困惑了!尝试删除contact.png或将其移动到另一个目录/启用重写日志,然后查看发生了什么。还要确保没有启用mime/内容自动协商。有关详细信息,请与该服务器的系统管理员联系,或与供应商联系以获取支持选项。配置手册如下:
RewriteRule ^contact/?$ /index.php?page=contact [L]
Options -MultiViews