Answers for "php server redirect to php file without php ending"

PHP
0

php server redirect to php file without php ending

Your .htaccess file would need to look something like this:

IndexIgnore * # prevent directory listing

Order deny,allow
Allow from *

# ------------------------------------------
# Rewrite so that php extentions are not shown
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
Posted by: Guest on June-17-2020

Browse Popular Code Answers by Language