网址重写工作,但不在应用程序内的链接上

时间:2018-10-28 18:51:27

标签: php .htaccess url-rewriting apache2.4

您对此有任何想法吗,我有此URL

http://localhost/boutique/index.php/Products/Description/products_id,2

我通过.htaccess重写了此内容

http://localhost/boutique/Products/Description/products_id,2

RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteRule (.*?)index\.php/*(.*) $1$2 [R=301,NE,L]

当我点击产品链接时,我有这个

http://localhost/boutique/Products/Description/products_id,2

但是在应用程序内部,链接始终是这样的:

http://localhost/boutique/index.php/Products/Description/products_id,2

我没有找到解决方案。如果您有想法或遇到相同的问题,我很感兴趣。

0 个答案:

没有答案