.htaccess Rewrite to remove the .php from the url
This one comes via my buddy Alex McKinney. Thanks Alex.
Place this in your .htaccess file to remove the .php from the url.
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUESTFILENAME} !-f
RewriteCond %{REQUESTFILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+)$ $1.php [L,QSA]
Written by Seth Hall
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#.htaccess
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#