-
Notifications
You must be signed in to change notification settings - Fork 1
/
.htaccess
54 lines (42 loc) · 1.52 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
# Some web hosts need a litlte help getting kicked into PHP5 mode:
# AddType x-mapp-php5 .php
# AddHandler x-mapp-php5 .php
# Disable Bad PHP Options
# <IfModule mod_php.c>
# php_flag register_globals off
# php_flag allow_url_include off
# php_flag magic_quotes_gpc off
# </IfModule>
# <IfModule mod_php5.c>
# php_flag register_globals off
# php_flag allow_url_include off
# php_flag magic_quotes_gpc off
# </IfModule>
Options +FollowSymLinks -Indexes
DirectoryIndex index.html index.php index.htm index.shtml
# Set it to a small 12 hours untill we are sure everything is solid, then bump it up.
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType text/plain "access plus 1 hour"
ExpiresByType text/html "access plus 1 hour"
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
</IfModule>
# Gzip output for better speed
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain text/html text/css text/javascript application/javascript
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
# Directory name
# RewriteBase /
# Secure sensitive directores and filetypes
RewriteRule ^app/.*$ - [F,L]
RewriteRule ^([0-9\-]+)(/([0-9a-z\-\_]+))?/?$ index.php?page=$1&slug=$3 [L]
</IfModule>