forked from YandolsZX/IcarusImeji
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1019 B
31 lines
1019 B
# Standard Declaration Procedures for Imeji System
|
|
ErrorDocument 403 /public/403.php
|
|
ErrorDocument 404 /public/404.php
|
|
IndexOptions +FancyIndexing
|
|
IndexIgnore *
|
|
|
|
# HTTPS Redirection
|
|
RewriteEngine On
|
|
RewriteCond %{HTTPS} off
|
|
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
|
|
RewriteEngine on
|
|
RewriteCond %{HTTP_USER_AGENT} ^ZmEu [OR]
|
|
RewriteCond %{HTTP_USER_AGENT} (.*)Msqq(.*)
|
|
RewriteRule .* http://www.urbandictionary.com/define.php?term=fuck+you [R=301,L]
|
|
|
|
#Preventing Public Access to Logs file
|
|
<FilesMatch "uploads.log">
|
|
AuthType Basic
|
|
AuthName "Restricted Area"
|
|
AuthUserFile /var/www/passes/imeji/.htpasswd
|
|
Require valid-user
|
|
</FilesMatch>
|