-
-
Save pascalknecht/23b448f6116eb48ca49d4a550f482d9f to your computer and use it in GitHub Desktop.
.htaccess
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
AuthType Basic | |
AuthName "BETA Site" | |
AuthUserFile "/var/www/vhosts/rederp.ch/html/_beta.rederp.ch/.htpasswd" | |
Require valid-user | |
</IfModule> | |
wk:$apr1$R.JuDQ11$V6oReBCgR7Jc52.JJG6n9/ |
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
#Redirect All | |
RewriteCond %{HTTP_HOST} !^www\. | |
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L] | |
#Redirect all without Subdomains | |
RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$ | |
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [NE,L,R=301] |
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
#BEGIN Force SSL | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{HTTPS} !=on [NC] | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
</IfModule> | |
#END Force SSL | |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> | |
# END WordPress |
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
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^cutisonic.info$ [OR] | |
RewriteCond %{HTTP_HOST} ^www\.cutisonic.info$ | |
RewriteRule ^/?$ "https\:\/\/www\.cutisonic.eu/" [R=301,L] |
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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
# Attempt to load files from production if | |
# they're not in our local version | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule wp-content/uploads/(.*) \ | |
http://{PROD}/wp-content/uploads/$1 [NC,L] | |
</IfModule> |
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
# BEGINTWIG special | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} .twig$ | |
RewriteRule . /index.php [L] | |
</IfModule> | |
# END Twig special | |
# BEGIN WKCustom | |
# Disable Directory Browsing | |
Options -Indexes | |
<files wp-config.php> | |
order allow,deny | |
deny from all | |
</files> | |
# BEGIN block author scans | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{QUERY_STRING} (author=\d+) [NC] | |
RewriteRule .* - [F] | |
# END block author scans | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^wp-admin/includes/ - [F,L] | |
RewriteRule !^wp-includes/ - [S=3] | |
RewriteRule ^wp-includes/[^/]+\.php$ - [F,L] | |
RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L] | |
RewriteRule ^wp-includes/theme-compat/ - [F,L] | |
</IfModule> | |
# END WKCustom |
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
Order deny,allow | |
Deny from all | |
<Files ~ ".(xml|css|jpe?g|png|gif|js|ttf|woff|svg|woff2|eot|pdf|docx|rtf|odf|zip|rar)$"> | |
Allow from all | |
</Files> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment