2014-12-01 121 views
0

下面的代码似乎与index.php冲突Htaccess冲突SEO网址友好

我将如何去允许index.php? :)>http://www.domain.com/

Options -MultiViews 
RewriteEngine on 
RewriteBase/

RewriteRule ^(\w+)/?$ live.php?content=$1 [L,QSA,NC] 

注:我还是希望它的URL重写/ $ 1

所有帮助非常感谢,我会感谢明显的解决方案。

如果你有一个解决方案,而不影响当前的结构感到自由张贴在下面。

回答

0

最好添加一个RewriteCond,以避免重写现有的文件/目录:

DirectoryIndex index.php 
Options -MultiViews 
RewriteEngine on 
RewriteBase/

RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule ^(\w+)/?$ live.php?content=$1 [L,QSA]