Created
May 7, 2011 11:35
-
-
Save alexrinass/960430 to your computer and use it in GitHub Desktop.
Apache .htaccess template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Error documents | |
ErrorDocument 404 /404.htm | |
ErrorDocument 403 /403.htm | |
#RedirectMatch permanent ^/somedir/?$ http://www.domain.com/ | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# RewriteBase / | |
# redirect domains without www | |
#RewriteCond %{SERVER_ADDR} x.x.x.x | |
#RewriteCond %{HTTP_HOST} !^www\.domain\.com$ | |
#RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301] | |
# maintenance | |
#RewriteCond %{REQUEST_URI} !/maintenance/ | |
#RewriteRule ^.*$ http://{DOMAIN}/maintenance/ [R=temp] | |
# Weitere Regeln | |
#RewriteRule ^some/url/?$ /target/url/ | |
# Dispatcher rewrite | |
#RewriteCond %{REQUEST_FILENAME} !-d | |
#RewriteCond %{REQUEST_FILENAME} !-f | |
#RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment