Last active
August 8, 2017 12:43
-
-
Save ADoebeling/2a327f9ba27863ec7eed to your computer and use it in GitHub Desktop.
.htaccess-defaults
This file contains hidden or 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
# .htaccess-defaults | |
# Some often used .htaccess-parameters | |
# | |
# @Author: Andreas Doebeling <[email protected]> | |
# @Copyright: 1601.communication gmbh | |
# @Link: http://www.1601.com | |
# @Link: http://xing.doebeling.de | |
# Always required at 1601-Hosting | |
RewriteEngine on | |
RewriteBase / | |
# HTTP-Auth | |
#AuthType Basic | |
#AuthName "Freigabeserver - contact [email protected]" | |
#AuthUserFile /path/to/.htpasswd | |
#Require valid-user | |
# Block all requests | |
#ErrorDocument 403 http://www.domain.tkd | |
#Deny from all | |
# Redirect all mapped domains to primary domain | |
#RewriteCond %{HTTP_HOST} !^DOMAIN\.TLD$ [nc] | |
#RewriteRule (.*) http://DOMAIN.TLD/$1 [R=permanent,nc,L] | |
# Redirect single domains | |
#RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$ [NC] | |
#RewriteRule (.*) http://example.com/$1 [R=301,L] | |
# Require https | |
#RewriteCond %{SERVER_PORT} !^443$ [nc] | |
#RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=permanent,nc,L] | |
# Rewrite favicon.ico on multisite-installations | |
#RewriteCond %{HTTP_HOST} ^(www\.)?domain1\.de$ [NC] | |
#RewriteRule ^favicon.ico$ /files/domain1/layout/favicon.ico [L] | |
#RewriteCond %{HTTP_HOST} ^(www\.)?domain2\.de$ [NC] | |
#RewriteRule ^favicon.ico$ /files/domain2/layout/favicon.ico [L] | |
# Redirect / to subdir | |
#RewriteRule ^$ /contenido/ [R=301,L] | |
# SEO-Redirects (with path) | |
#RedirectPermanent /oldUrl /newUrl | |
# SEO-Redirects (without path, case-insensitive) | |
#RedirectMatch Permanent (?i)/oldUrl /newUrl | |
# Shortlink w/ monitoring | |
#RewriteCond %{HTTP_HOST} ^(www\.)?jobs.xxx\.de$ [NC] | |
#RewriteRule (.*) https://www.xxx.de/jobs [R=301,L] | |
#RedirectMatch Permanent ^(?i)/jobs /de/unternehmen/jobs.html | |
# SEO/Performance | |
#Header set Connection keep-alive | |
# Support httpAuth at fast-cgi | |
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] | |
# Proxy-Rewriting | |
#RewriteCond %{REQUEST_FILENAME} !-d | |
#RewriteCond %{REQUEST_FILENAME} !-f | |
#RewriteRule ^(.*)$ https://xxx.tld/$1 [L,P] | |
# Error Document | |
#ErrorDocument 404 /error-404.html | |
#ErrorDocument 403 /error-403.html | |
# Fixing old allow/deny from all in subfolders (of contao) | |
# == OLD == | |
# order deny,allow | |
# #allow from all | |
# == NEW == | |
# <IfModule !mod_authz_core.c> | |
# Order deny,allow | |
# Allow from all | |
# </IfModule> | |
# <IfModule mod_authz_core.c> | |
# Require all granted | |
# </IfModule> |
Weiterleitung domainspezifischer Sitemap
RewriteCond %{HTTP_HOST} ^(www\.)?domain1\.de$ [NC]
RewriteRule ^sitemap.xml$ share/sitemap1.xml [R=301,L]
RewriteCond %{HTTP_HOST} ^(www\.)?domain2\.de$ [NC]
RewriteRule ^sitemap.xml$ share/sitemap2.xml [R=301,L]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
außerdem fehlt noch die bessere Möglichkeit, um SSL zu aktivieren: