Skip to content

Commit ce32aaa

Browse files
authored
Create .htaccess
1 parent c5eea88 commit ce32aaa

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.htaccess

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# php_value display_errors 1
2+
# DirectoryIndex index.html index.php
3+
4+
# Dont list dirs
5+
Options -Indexes
6+
7+
# Enable rewrite
8+
RewriteEngine On
9+
RewriteBase /
10+
11+
# To non-www
12+
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
13+
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
14+
15+
# Http to https
16+
RewriteCond %{HTTPS} off
17+
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
18+
19+
# Https to http
20+
# RewriteCond %{HTTPS} on
21+
# RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

0 commit comments

Comments
 (0)