I'm trying to make a system so this this url:
example.com/php/get
gets redirected to something like this:
example.com/get.php
All of this with .htaccess
I have this:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/php/$
RewriteRule ^(.+)$ /$1.php [L,QSA]
But it doens't seems to work...
Try this:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/php/([^/]+)$ [NC]
RewriteRule ^ /%1.php [R=301,QSA,NC,L]
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments