.htaccess停止删除index.php

.htaccess停止删除index.php,php,.htaccess,Php,.htaccess,在将客户站点切换到linux cpanel Web服务器后,我遇到了问题 访问站点确实有效,但链接无效 我需要它停止删除index.php后的域名上的所有链接(或开始添加它!) 这是当前我的.htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTPS} !=on RewriteCond %{HTTP_HOST} !^www\..+$ [NC] RewriteCond %{H

在将客户站点切换到linux cpanel Web服务器后,我遇到了问题

访问站点确实有效,但链接无效

我需要它停止删除index.php后的域名上的所有链接(或开始添加它!)

这是当前我的.htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
RewriteCond %{HTTP_HOST} (.+)$ [NC]
RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>

重新启动发动机
重写基/
重写cond%{HTTPS}=在…上
重写cond%{HTTP_HOST}^www\..+$[NC]
重写cond%{HTTP_HOST}(+)$[NC]
重写规则^(.*)$http://www.%1/$1[R=301,L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写秒$1!\。(gif | jpe?g | png)$[NC]
重写规则^(.*)$/index.php/$1[L]
有人能告诉我怎样才能做到这一点吗

提前感谢

更改

RewriteRule ^(.*)$ /index.php/$1 [L]


删除
RewriteRule^(.*)$/index.php/$1[L]
-然后测试它删除它,现在每当我单击一个链接时,我只得到404尝试以下操作:RewriteRule。index.php[L]尝试将
RewriteRule^(.*)$/index.php/$1[L]
更改为
RewriteRule^(.*)$/index.php/$1[R=301,L]
@user2195891很高兴能提供帮助,请点击投票箭头下的勾号图标接受我的回答,以明确这个问题已经解决(以及如何解决)
RewriteRule ^(.*)$ /index.php/$1 [R=301,L]