-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
95 lines (79 loc) · 3.09 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect to https
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ ^$1 [N]
RewriteCond %{REQUEST_URI} (\.\w+$) [NC]
RewriteCond %{REQUEST_URI} !(\.txt)$ [NC]
RewriteRule ^(.*)$ public/$1
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ server.php
RewriteCond %{REQUEST_METHOD} !^(GET|POST|DELETE|PATCH)
RewriteRule .* - [R=405,L]
# Redirect to / if the request is empty
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ / [R=301,L]
# Remove trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteRule ^(.*)/$ $1 [R=301,L]
# Remove trailing index.php
RewriteCond %{REQUEST_URI} !/index\.php
RewriteRule ^(.*)/index\.php$ $1 [R=301,L]
# Remove trailing index.html
RewriteCond %{REQUEST_URI} !/index\.html
RewriteRule ^(.*)/index\.html$ $1 [R=301,L]
# Remove trailing index.htm
RewriteCond %{REQUEST_URI} !/index\.htm
RewriteRule ^(.*)/index\.htm$ $1 [R=301,L]
# Remove trailing index
RewriteCond %{REQUEST_URI} !/index
RewriteRule ^(.*)/index$ $1 [R=301,L]
# SEO redirects
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/sitemap.xml$ $1/sitemap.xml [R=301,L]
RewriteRule ^(.*)/robots\.txt$ $1/robots.txt [R=301,L]
RewriteRule ^(.*)/favicon\.ico$ $1/favicon.ico [R=301,L]
RewriteRule ^(.*)/humans\.txt$ $1/humans.txt [R=301,L]
RewriteRule ^(.*)/ads\.txt$ $1/ads.txt [R=301,L]
</IfModule>
# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php8_module>
php_flag display_errors Off
php_value max_execution_time 60
php_value max_input_time 120
php_value max_input_vars 2000
php_value memory_limit 256M
php_value post_max_size 1000M
php_value session.gc_maxlifetime 1440
php_value session.save_path "/var/cpanel/php/sessions/ea-php82"
php_value upload_max_filesize 8M
php_flag zlib.output_compression On
</IfModule>
<IfModule lsapi_module>
php_flag display_errors Off
php_value max_execution_time 60
php_value max_input_time 120
php_value max_input_vars 2000
php_value memory_limit 256M
php_value post_max_size 1000M
php_value session.gc_maxlifetime 1440
php_value session.save_path "/var/cpanel/php/sessions/ea-php82"
php_value upload_max_filesize 8M
php_flag zlib.output_compression On
</IfModule>
# END cPanel-generated php ini directives, do not edit