-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.htaccess
81 lines (58 loc) · 2.08 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
76
77
78
79
80
81
# Options:
# -MultiViews: Turns off multiviews so it doesn't interfer with our rewrite rules
# -Indexes: Stop directory listings
# +FollowSymlinks: Let out rewrite rules work
Options -MultiViews -Indexes +FollowSymlinks
<IfModule mod_security.c>
# Turn off mod_security filtering.
# SecFilterEngine Off
# The below probably isn't needed, but better safe than sorry.
SecFilterScanPOST Off
</IfModule>
ErrorDocument 404 /404.php
<IfModule mod_php5.c>
php_value register_globals 0
php_value magic_quotes_gpc 0
php_value session.auto_start 0
php_value safe_mode 0
</IfModule>
<IfModule sapi_apache2.c>
php_value register_globals 0
php_value magic_quotes_gpc 0
php_value session.auto_start 0
php_value safe_mode 0
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)/{2,}(.*)$
RewriteRule . %1/%2 [R=301,L]
#RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
#RewriteRule ^(.*)$ http://%1/$1 [R=301,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^bills$ bills.php [L]
RewriteRule ^bills/([^/]+)/?$ bills.php?billname=$1 [L]
RewriteRule ^committees$ committees.php [L]
RewriteRule ^committees/([^/]+)/?$ committees.php?committeename=$1 [L]
RewriteRule ^meetings$ meetings.php [L]
RewriteRule ^meetings/([^/]+)/?$ meetings.php?meetingname=$1 [L]
RewriteRule ^leaders$ leaders.php [L]
RewriteRule ^leaders/([^/]+)/?$ leaders.php?leadername=$1 [L]
RewriteRule ^search$ search.php [L]
RewriteRule ^search/([^/]+)/?$ search.php?keywords=$1 [L]
RewriteRule ^category/([^/]+)/([^/]+) category.php?catname=$1&pg=$2 [L]
RewriteRule ^category/([^/]+)/?$ category.php?catname=$1 [L]
RewriteRule ^content/([^/]+)/?$ content.php?pagename=$1 [L]
RewriteRule ^tags/([^/]+)/?$ tags.php?tagname=$1 [L]
#RewriteRule ^tags/([^/]+)/([^/]+) tags.php?tagname=$1&pg=$2 [L]
</IfModule>
<ifModule mod_deflate.c>
<filesmatch "\.(js|css|html|jpg|png|gif|eot|woff|ttf|svg)$">
SetOutputFilter DEFLATE
</filesmatch>
</ifModule>
<FilesMatch "\.(htaccess|htpasswd|ini|log|sh|inc|bak|cache)$">
Order Allow,Deny
Deny from all
</FilesMatch>