Skip to content

Instantly share code, notes, and snippets.

@nasal
Created January 15, 2014 07:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nasal/8432148 to your computer and use it in GitHub Desktop.
Save nasal/8432148 to your computer and use it in GitHub Desktop.
Apache: remove .php extension from url
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment