Skip to content

Instantly share code, notes, and snippets.

@dextermb
Created October 16, 2016 07:10
Show Gist options
  • Select an option

  • Save dextermb/d47c1a245bcc9902f88e14fc75037fb3 to your computer and use it in GitHub Desktop.

Select an option

Save dextermb/d47c1a245bcc9902f88e14fc75037fb3 to your computer and use it in GitHub Desktop.
RewriteEngine On
RewriteBase /
# RewriteCond %{HTTPS} !=on
# RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+?)/?$ $1.php [L]
<FilesMatch "\.htacces|config\.php">
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</FilesMatch>
Options All -Indexes
Options -MultiViews
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment