0

我有网址:https://example.com/index.php?categoryID=127/index.php 写 htacces:

RewriteRule ^index\.php(.*)$ /$1 [R=301,L]
RewriteRule ^(.*)/index\.php(.*)$ /$1$2 [R=301,L]

我得到了https://example.com/?categoryID=127/index.php

如何删除变量后的 index.php?必须使用 htaccess 还是需要通过 php 更改根 index.php url?怎么能这样做?

4

0 回答 0