PHP

HIDE PHP EXTENSION IN THE URL WITH HTACCESS

RENAME "PHP" AS "PY ASP UNKNOW FILE TYPE" AddType application/x-httpd-php .py .asp   AddType application/x-httpd-php .foo .bar

NOT GOOD Clashes with other languages, causes confusion among developers.

OFFICIAL SOLUTION

01

HTACCESS ALTERNATIVE

02

RewriteEngine on   NO REWRITE EXISTING FILES & FOLDERS RewriteCond %{REQUEST_FILENAME} !-d  REWRITE PHP FILES ONLY RewriteCond %{REQUEST_FILENAME}.php -f

"MAP" HTTP://SITE.COM/PAGE/ TO HTTP://SITE.COM/PAGE.PHP RewriteRule ^([^\.]+)$ $1.php [NC,L]