Skip to content

Instantly share code, notes, and snippets.

@pngmark
Created November 21, 2017 09:13
Show Gist options
  • Save pngmark/af08ebe502ff391a5c5dc0fa52ae04da to your computer and use it in GitHub Desktop.
Save pngmark/af08ebe502ff391a5c5dc0fa52ae04da to your computer and use it in GitHub Desktop.
Sample .htaccess file
#AuthType Basic
#AuthName "My Protected Area"
#AuthUserFile /path/to/.htpasswd
#Require valid-user
Options -Indexes
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment