-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
56 lines (45 loc) · 1.42 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Php 8.2 Ovh
# SetEnv PHP_VER 8_2
# SetEnv REGISTER_GLOBALS 0
# Php 8.2 Small.pl hosting
AddType application/x-httpd-php82 .php
DirectoryIndex index.php
Options -Indexes -MultiViews +SymLinksIfOwnerMatch
# Options -Indexes -MultiViews +FollowSymlinks
# That was ONLY to protect you from 500 errors if your server did not have mod_rewrite enabled
#<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Root to public
RewriteRule ^$ public/index.php [L]
RewriteRule ^((?!public/).*)$ public/$1 [L,NC]
RewriteRule (^\.|/\.) - [F]
# SSL without www (copy to public .htaccess)
#RewriteEngine On
#RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
#RewriteRule ^(.*)$ http://%1/$1 [L,R=301,NC]
# SSL http to https (copy to public .htaccess)
#RewriteEngine On
#RewriteCond %{SERVER_PORT} 80
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NC]
# Trailing slash (copy to public .htaccess)
#RewriteEngine On
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^(.*)/$ /$1 [R=301,L,NC]
#</IfModule>
#<IfModule mod_rewrite.c>
# Directory deny access
RewriteEngine on
RewriteRule ^(logs|storage|backup) - [F]
#</IfModule>
<Files .env>
Order allow,deny
Deny from all
</Files>
<FilesMatch "^\.">
Order allow,deny
Deny from all
</FilesMatch>
<FilesMatch ".(jpg|jpeg|png|gif|ico|webp)$">
Header set Cache-Control "max-age=86400, public"
</FilesMatch>