Answers for "Redirect file.php to file with .htaccess | Redirect to its non .php version"

PHP
0

Redirect file.php to file with .htaccess | Redirect to its non .php version

# To externally redirect /dir/file.php to /dir/file
RewriteCond %{THE_REQUEST} \s/+(.+?)\.php[\s?] [NC]
RewriteRule ^ /%1 [R=301,NE,L]
Posted by: Guest on March-26-2022

Code answers related to "Redirect file.php to file with .htaccess | Redirect to its non .php version"

Browse Popular Code Answers by Language