简体   繁体   中英

.htaccess index.php url redirect

I have got url like this:

http://www.example.com/index.php/shop/productname

or like this

http://www.example.com/index.php/productname

How Can i redirect all this pages to own, but without index.php?

I want to see

http://www.example.com/shop/productname and http://www.example.com/productname

这是您需要的: RewriteRule ^index\\.php/(.+)$ /$1 [R=301,L]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM