Answers for "hide instantion from url with .htaccess file php"

PHP
0

hide .php from url .htaccess

# Run Php without filename extension
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php

# Return 404 if original request is .php
RewriteCond %{THE_REQUEST} "^[^ ]* .*?.php[? ].*$"
RewriteRule .* - [L,R=404]
Posted by: Guest on November-06-2020

Code answers related to "hide instantion from url with .htaccess file php"

Browse Popular Code Answers by Language