.htaccess 如何删除url htaccess中的index.php

.htaccess 如何删除url htaccess中的index.php,.htaccess,.htaccess,如何删除我的url中的index.php 我的访问权限是 RewriteCond %{THE_REQUEST} ^.*\/index\.php\ HTTP/ RewriteRule ^(.*)index\.php$ /$1 [R=301,L] 我以http://domain.com/index.php它重定向到http://domain.com如何解决此问题 试试这个 RewriteEngine On RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)i

如何删除我的url中的index.php

我的访问权限是

RewriteCond %{THE_REQUEST} ^.*\/index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ /$1 [R=301,L]
我以
http://domain.com/index.php
它重定向到
http://domain.com
如何解决此问题

试试这个

RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)index\.php($|\ |\?)
RewriteRule ^ /%1 [R=301,L]

但是回到
http://domain.com
您想要的是正确的(在删除index.php之后)?