Skip to content

Instantly share code, notes, and snippets.

@amad
Forked from ziadoz/debug.conf
Created June 26, 2013 14:02
Show Gist options
  • Save amad/5867609 to your computer and use it in GitHub Desktop.
Save amad/5867609 to your computer and use it in GitHub Desktop.
<VirtualHost *:80>
ServerName example.dev
DocumentRoot /var/www/vhosts/www.example.com/public
# Enable Rewrite Log Debugging (Apache 2.2)
RewriteLog /var/www/vhosts/www.example.com/rewrite.log
RewriteLogLevel 6
# Enable Rewrite Log Debugging (Apache 2.4)
# LogLevel alert rewrite:trace6
<Location />
# Strip PHP File Extension
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule (.*) $1.php [L,QSA]
</Location>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment