-
Notifications
You must be signed in to change notification settings - Fork 1
/
.htaccess
executable file
·59 lines (32 loc) · 1011 Bytes
/
.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
#No to HTTP
#RewriteEngine On
#RewriteCond %{HTTPS} !=on
#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#No to WWW
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
#No to .PHP
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L,NC]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [L]
#No to SHOW FILES IN AN FOLDER
Options -Indexes
IndexIgnore *
#No to INDEX.PHP
DirectoryIndex home.php
#Fix Fonts Problem
<IfModule mod_headers.c>
<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|css)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>
#Set 404 - 403 error file
ErrorDocument 403 http://localhost/ir-studies/error/403.php
ErrorDocument 404 http://localhost/ir-studies/error/404.php
#No to ERROR_LOG
php_flag log_errors Off