-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy path.htaccess
75 lines (65 loc) · 1.94 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
##
# deny .htaccess from directly access.
##
<Files ".htaccess">
order allow,deny
deny from all
</Files>
##
# If you get 'No input file specified'. message or you have problems with FastCGI.
# Remove (#) from beginning Options +ExecCGI.
##
Options +ExecCGI
##
# Add Indexes
##
Options All -Indexes
##
# Rewrite Engine Module
##
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
##
# Installation directory.
#
#RewriteBase /
##
# If you have any problems with requesting in your website remove (#) from begining of RewriteRule ^(.+)$ index.php/$1 [L]
# and add (#) to RewriteRule .* index.php?/$0 [PT,L,QSA].
##
#RewriteRule ^(.+)$ index.php/$1 [L]
RewriteRule .* index.php?/$0 [PT,L,QSA]
##
# Return urls without www to www
##
#RewriteCond %{http_host} ^YourWebsiteURL.com [nc]
#RewriteRule ^(.*)$ http://www.YourWebsiteURL.com/$1 [r=301,nc]
##
# SSL connection, if you have a SSL SSL connection
##
#RewriteCond %{HTTPS} !on
#RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI}
##
# If Apache is compiled with built in mod_deflade/GZIP support
# then GZIP Javascript, CSS, HTML and XML so they're sent to
# the client faster.
##
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript text/css text/html text/xml
</IfModule>
##
# mod_gzip is an external extension module for Apache that allows you to quickly and easily compress your files before you send them to the client.
# This speeds up your site like crazy!
# If your hosting provider has mod_gzip module enabled start GZIP.
##
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>