0x01.

通过重写规则,xx/index.php/xxx => xx/xxx

在网站根目录下,添加个.htaccess文件,apache读取时,会自动匹配.htaccess里的规则

......

0x02

.htaccess 添加正则代码

<IfModule mod_rewrite.c>

  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
 </IfModule>

------------------------

httpd.conf 配置

开启重写模块 #loadmodule rewrite_module libexec/apache2/mod_rewrite.so 去掉#注释

修改<directory /xx/xxx>

AllowOverride none =>AllowOverride All

</directory>

重启apache

......待定