-
Notifications
You must be signed in to change notification settings - Fork 2
/
.htaccess
32 lines (27 loc) · 1.38 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<IfModule mod_rewrite.c>
RewriteEngine On
Redirect /upload/ /404/
# Password protection for public folder
#AuthType Basic
#AuthName "Password protected area"
#AuthUserFile /path/to/.htpasswd
#Require valid-user
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} codelinered\.net
RewriteRule ^(.*)$ https://fs.codelinered.net/$1 [L,R=301]
# Some hosts may require you to use the `RewriteBase` directive.
# Determine the RewriteBase automatically and set it as environment variable.
# If you are using Apache aliases to do mass virtual hosting or installed the
# project in a subdirectory, the base path will be prepended to allow proper
# resolution of the index.php file and to redirect to the correct URI. It will
# work in environments without path prefix as well, providing a safe, one-size
# fits all solution. But as you do not need it in this case, you can comment
# the following 2 lines to eliminate the overhead.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
# If the above doesn't work you might need to set the `RewriteBase` directive manually, it should be the
# absolute physical path to the directory that contains this htaccess file.
# RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
</IfModule>