-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
68 lines (60 loc) · 2.02 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
<Files ~ "^\.(htaccess|htpasswd)$">
order allow,deny
deny from all
</Files>
<Files ~ "^\index$">
order allow,deny
deny from all
</Files>
<FilesMatch "\.(jpg|png|gif|js|css|ico|swf)$">
#Header set cache-Control: "max-age=572800, must-revalidate"
Header set cache-Control: "max-age=1, must-revalidate"
</FilesMatch>
<IfModule mod_headers.c>
Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
</IfModule>
Options -Indexes
DirectoryIndex index.html
order deny,allow
Header unset ETag
FileETag None
# Force SSL
#RewriteEngine On
#RewriteCond %{HTTPS} !=on
#RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
# Run HTML without filename extension
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html
# Return 404 if original request is .html
RewriteEngine on
RewriteCond %{THE_REQUEST} "^[^ ]* .*?\.html[? ].*$"
RewriteRule .* - [L,R=404]
# Run PHP without filename extension
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php
# Return 404 if original request is .php
RewriteEngine on
RewriteCond %{THE_REQUEST} "^[^ ]* .*?\.php[? ].*$"
RewriteRule .* - [L,R=404]
# Replace get values with slashes
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^([^/]+)/?$ $1.php [L]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]
RewriteRule ^([^/]+)/([^/]+)/?$ $1.php?get1=$2 [L,QSA]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/?$ $1.php?get1=$2&get2=$3 [L,QSA]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/?$ $1.php?get1=$2&get2=$3&get3=$4 [L,QSA]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/?$ $1.php?get1=$2&get2=$3&get3=$4&get4=$5 [L,QSA]
# Redirect 403 error
#ErrorDocument 403 https://gamesconverse.space/403
# Redirect 404 error
#ErrorDocument 404 https://gamesconverse.space/404
# Redirect 500 error
#ErrorDocument 500 https://gamesconverse.space/500