Last active
March 21, 2021 13:05
-
-
Save Domm98CZ/7fba08e6693e3dd1dc05860929873c80 to your computer and use it in GitHub Desktop.
wedos main htaccess
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
RewriteEngine On | |
ErrorDocument 500 "500 - Vnitrni chyba!" | |
ErrorDocument 404 "404 - Stranka nenalezena!" | |
ErrorDocument 401 "Litujeme, ale nemate pravo k pristupu k tomuto souboru!" | |
ErrorDocument 403 "Litujeme, ale nemate pravo k pristupu k tomuto souboru!" | |
# cele domeny (aliasy) | |
RewriteCond %{REQUEST_URI} !^domains/ | |
RewriteCond %{REQUEST_URI} !^/domains/ | |
RewriteCond %{HTTP_HOST} ^(www\.)?(.*)$ | |
RewriteCond %{DOCUMENT_ROOT}/domains/%2 -d | |
RewriteRule (.*) domains/%2/$1 [DPI] | |
# subdomeny (s nebo bez www na zacatku) | |
RewriteCond %{REQUEST_URI} !^subdom/ | |
RewriteCond %{REQUEST_URI} !^/subdom/ | |
RewriteCond %{HTTP_HOST} ^(www\.)?(.*)\.([^\.]*)\.([^\.]*)$ | |
RewriteCond %{DOCUMENT_ROOT}/subdom/%2 -d | |
RewriteRule (.*) subdom/%2/$1 [DPI] | |
# aliasy - spravne presmerovani pri chybejicim / | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^domains/[^/]+/(.+[^/])$ /$1/ [R] | |
# subdomeny - spravne presmerovani pri chybejicim / | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^subdom/[^/]+/(.+[^/])$ /$1/ [R] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment