Skip to content

Instantly share code, notes, and snippets.

@e1senh0rn
Created June 6, 2009 18:40
Show Gist options
  • Save e1senh0rn/124968 to your computer and use it in GitHub Desktop.
Save e1senh0rn/124968 to your computer and use it in GitHub Desktop.
<FilesMatch "\.(engine|inc|info|install|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$">
Order allow,deny
</FilesMatch>
Options -Indexes +FollowSymLinks
ErrorDocument 404 /index.php
<Files favicon.ico>
ErrorDocument 404 "The requested file favicon.ico was not found."
</Files>
DirectoryIndex index.php
<IfModule mod_php5.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A1209600
ExpiresByType text/html A1
</IfModule>
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteCond %{REQUEST_URI} !^/stats(.*)
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment