forked from interclip/interclip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
50 lines (45 loc) · 1.5 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
# Prevent viewing of htaccess file.
<Files .htaccess>
order allow,deny
deny from all
</Files>
<Files db.php>
order allow,deny
deny from all
</Files>
AddDefaultCharset UTF-8
DefaultLanguage en-US
# REDIRECT FAVICON.ICO
<ifmodule mod_rewrite.c>
RewriteCond %{REQUEST_URI} !^/favicon\.ico [NC]
RewriteCond %{REQUEST_URI} favicon\.ico [NC]
RewriteRule (.*) img/favicon.ico [R=301,L]
</ifmodule>
# Prevent directory listings
Options All -Indexes
#remove php file extension
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php [NC,L]
#Add Trailing slash for end of the URL
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(.*[^/])$ /$1/ [L,R]
#Error handling
ErrorDocument 400 /includes/error.php
ErrorDocument 401 /includes/error.php
ErrorDocument 402 /includes/error.php
ErrorDocument 404 /includes/error.php
ErrorDocument 403 /includes/error.php
ErrorDocument 405 /includes/error.php
ErrorDocument 406 /includes/error.php
ErrorDocument 407 /includes/error.php
ErrorDocument 408 /includes/error.php
ErrorDocument 409 /includes/error.php
ErrorDocument 414 /includes/error.php
ErrorDocument 500 /includes/error.php
ErrorDocument 502 /includes/error.php
ErrorDocument 504 /includes/error.php
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>