John Davidson

apache - lightspeed RewriteRule for redirect example.com/index.php/* to example.com/*

0 comments
Message:


i want to redirect 301 all requests has index.php after example.com to url with no index.php :
example.com/index.php/(someroute) --> example.com/(someroute)


i already try below question in stackowerflow but only work for example.com/index.php


Redirect example.com/index.php to example.com using .htaccess


please help for this.



My Answer:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/index.php/(.*)
RewriteRule ^(.*)$ https://example.com/%1 [R=301,L]

Rate this post

5 of 5 based on 6419 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us