Skip to content

Commit c76b91f

Browse files
authored
Merge pull request #213 from AntoninoM90/htaccess
Create .htaccess and updated public/.htaccess
2 parents a9d1d29 + 926f5de commit c76b91f

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.htaccess

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
+Options All –Indexes
2+
3+
<Files .htaccess>
4+
order allow,deny
5+
deny from all
6+
</Files>
7+
8+
<IfModule mod_rewrite.c>
9+
# Redirect to the public folder
10+
RewriteEngine On
11+
# RewriteBase /
12+
RewriteRule ^$ public/ [L]
13+
RewriteRule (.*) public/$1 [L]
14+
15+
# Redirect to HTTPS
16+
# RewriteEngine On
17+
# RewriteCond %{HTTPS} off
18+
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
19+
</IfModule>

public/.htaccess

+13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1+
+Options All –Indexes
2+
3+
<Files .htaccess>
4+
order allow,deny
5+
deny from all
6+
</Files>
7+
18
<IfModule mod_rewrite.c>
29
RewriteEngine On
310

11+
# Redirect to HTTPS
12+
# RewriteEngine On
13+
# RewriteCond %{HTTPS} off
14+
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
15+
416
# Some hosts may require you to use the `RewriteBase` directive.
517
# Determine the RewriteBase automatically and set it as environment variable.
618
# If you are using Apache aliases to do mass virtual hosting or installed the
@@ -16,6 +28,7 @@
1628
# absolute physical path to the directory that contains this htaccess file.
1729
# RewriteBase /
1830

31+
RewriteCond %{REQUEST_FILENAME} !-d
1932
RewriteCond %{REQUEST_FILENAME} !-f
2033
RewriteRule ^ index.php [QSA,L]
2134
</IfModule>

0 commit comments

Comments
 (0)