Cleanup .htaccess files.

master
YandolsZX 6 years ago
parent 1722e1a3de
commit f742310fdc
  1. 8
      .htaccess
  2. 10
      public/.htaccess

@ -9,19 +9,13 @@ RewriteEngine On
RewriteCond %{HTTPS} off RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# Force Uploaded Imejis to load via HTTP instead of HTTPS due to backwards compatibility problem on some platforms.
# SHOULD no longer be needed after the switch to LetsEncrypt on 31/07/2016
#RewriteCond %{HTTPS} on
#ReWriteCond %{REQUEST_URI} \w(\.png|\.jpeg|\.jpg|\.gif)$
#RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R,L]
# Hackerbots Prevention # Hackerbots Prevention
RewriteEngine on RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^ZmEu [OR] RewriteCond %{HTTP_USER_AGENT} ^ZmEu [OR]
RewriteCond %{HTTP_USER_AGENT} (.*)Msqq(.*) RewriteCond %{HTTP_USER_AGENT} (.*)Msqq(.*)
RewriteRule .* http://www.urbandictionary.com/define.php?term=fuck+you [R=301,L] RewriteRule .* http://www.urbandictionary.com/define.php?term=fuck+you [R=301,L]
#Preventing Public Access to Logs file # Prevent public access to the logs
<FilesMatch "(logs.php|uploads.log)$"> <FilesMatch "(logs.php|uploads.log)$">
AuthType Basic AuthType Basic
AuthName "Restricted Area" AuthName "Restricted Area"

@ -3,27 +3,17 @@ ErrorDocument 403 /403.php
ErrorDocument 404 /404.php ErrorDocument 404 /404.php
Options -Indexes Options -Indexes
# HTTPS Redirection # HTTPS Redirection
RewriteEngine On RewriteEngine On
RewriteCond %{HTTPS} off RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# Force Uploaded Imejis to load via HTTP instead of HTTPS due to backwards compatibility problem on some platforms.
# SHOULD no longer be needed after the switch to LetsEncrypt on 31/07/2016
#RewriteCond %{HTTPS} on
#ReWriteCond %{REQUEST_URI} \w(\.png|\.jpeg|\.jpg|\.gif)$
#RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R,L]
# Hackerbots Prevention # Hackerbots Prevention
RewriteEngine on RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^ZmEu [OR] RewriteCond %{HTTP_USER_AGENT} ^ZmEu [OR]
RewriteCond %{HTTP_USER_AGENT} (.*)Msqq(.*) RewriteCond %{HTTP_USER_AGENT} (.*)Msqq(.*)
RewriteRule .* http://www.urbandictionary.com/define.php?term=fuck+you [R=301,L] RewriteRule .* http://www.urbandictionary.com/define.php?term=fuck+you [R=301,L]
#Preventing Public Access to assets folder
#RedirectMatch 403 ^/assets/?$
#Allow linking asset elemets across subdomains #Allow linking asset elemets across subdomains
<IfModule mod_headers.c> <IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*" Header set Access-Control-Allow-Origin "*"

Loading…
Cancel
Save