-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.htaccess
More file actions
26 lines (20 loc) · 793 Bytes
/
.htaccess
File metadata and controls
26 lines (20 loc) · 793 Bytes
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
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
Options +FollowSymLinks
RewriteEngine On
# Uncomment if HTTPS is enabled. FYI, HSTS header increases security of your website & SEO
# <IfModule mod_headers.c>
# Header set Strict-Transport-Security "max-age=31536000; preload" env=HTTPS
# </IfModule>
# Remove www subdomain in the URL
# RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
# RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
# Redirect trailing slashes if it isn't a folder
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /?$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L]
</IfModule>