【发布时间】:2014-03-13 15:42:44
【问题描述】:
我正在使用 ExpressionEngine 作为我网站的 CMS。我创建了一个带有以下内容的 .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Removes index.php from ExpressionEngine URLs
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteCond %{REQUEST_URI} !/system/.* [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
# Directs all EE web requests through the site index file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{HTTP_HOST} ^www.gsmastersinc.com$ [NC]
RewriteRule ^(.*)$ http://gsmastersinc.com/$1 [R=301,L]
</IfModule>
为什么我网站的所有网址都有一个 ?在他们中?前任。 myurl/?/contact.
你可以在这里看到我在说什么:http://gsmastersinc.com,然后点击任何导航链接。悬停时,它不显示?,只有在单击它之后。
我必须拥有 ?在第 13 行的 /index.php 或链接断开后,我得到 404。
我整个上午都在寻找答案,但出现的一切都与 .NET 或类似的东西有关。
谢谢
【问题讨论】:
标签: regex apache .htaccess mod-rewrite expressionengine