这是我的.htaccess文件,位于public_html文件夹的根目录中:
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>
当我点击导航链接时,它会导航到:
http://codeliger.com/contact.png
我该如何解决这个问题?
答案 0 :(得分:1)
答案 1 :(得分:0)
我认为问题在这里.. RewriteRule ^contact?/$ /index.php?page=contact [L]
^
更改此行
RewriteRule ^contact?/$ /index.php?page=contact [L]
与
RewriteRule ^contact/?$ /index.php?page=contact [L]