-
Notifications
You must be signed in to change notification settings - Fork 10
/
htaccess.dist
89 lines (72 loc) · 2.83 KB
/
htaccess.dist
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
82
83
84
85
86
87
88
89
#############################################################################
##### Flyspray .htaccess Config. To be used with Apache Server ###
##### Check for Mod-Rewrite module ############################################
#### rename this file to .htaccess to use these features
###############################################################################
AddDefaultCharset utf-8
#mod security conflicts with flyspray and you do not need it here
# see also http://blog.php-security.org/archives/70-Modsecurity-vs.-PHP.html
#for mod_security 1
<IfModule mod_security.c>
SecFilterEngine Off
</IfModule>
#modsecurity 2
<IfModule security2_module>
SecRuleEngine Off
</IfModule>
# php5 as apache 1/2 module
<IfModule mod_php5.c>
php_flag register_globals Off
php_flag magic_quotes_gpc Off
php_flag session.use_trans_sid 0
php_flag short_open_tag off
php_flag register_argc_argv Off
php_flag register_long_arrays Off
#not for now, flyspray has it's own filters.
php_value filter.default "unsafe_raw"
php_flag always_populate_raw_post_data Off
</IfModule>
# php4 as **apache 1** module
<IfModule mod_php4.c>
php_flag register_globals Off
php_flag magic_quotes_gpc Off
php_flag session.use_trans_sid 0
php_flag short_open_tag off
php_flag register_argc_argv Off
php_value filter.default "unsafe_raw"
php_flag always_populate_raw_post_data Off
</IfModule>
#php4 as **apache 2** module
<IfModule sapi_apache2.c>
php_flag register_globals Off
php_flag magic_quotes_gpc Off
php_flag session.use_trans_sid 0
php_flag short_open_tag off
php_flag register_argc_argv Off
php_value filter.default "unsafe_raw"
php_flag always_populate_raw_post_data Off
</IfModule>
# We only use POST GET and HEAD (implicit)
<LimitExcept POST GET>
Deny From All
</LimitExcept>
<IfModule mod_rewrite.c>
RewriteEngine on
#RewriteBase /flyspray
RewriteRule ^([0-9]+)$ index.php?do=details&task_id=$1 [L,QSA]
RewriteRule ^task/([0-9]+)$ index.php?do=details&task_id=$1 [L,QSA]
RewriteRule ^details/task([0-9]+)$ index.php?do=details&task_id=$1 [L,QSA]
RewriteRule ^depends/task([0-9]+)$ index.php?do=depends&task_id=$1 [L,QSA]
RewriteRule ^myprofile/?$ index.php?do=myprofile [L,QSA]
RewriteRule ^user/([0-9]+)$ index.php?do=user&id=$1 [L,QSA]
RewriteRule ^logout$ index.php?do=authenticate&logout=1 [L,QSA]
RewriteRule ^admin/([a-zA-Z]+)$ index.php?do=admin&area=$1 [L,QSA]
RewriteRule ^admin/proj0/([a-zA-Z]+)$ index.php?do=admin&area=$1 [L,QSA]
RewriteRule ^pm/proj([0-9]+)/([a-zA-Z]+)$ index.php?do=pm&project=$1&area=$2 [L,QSA]
RewriteRule ^myprofile/([a-zA-Z]+)$ index.php?do=myprofile&area=$1 [L,QSA]
RewriteRule ^register$ index.php?do=register [L,QSA]
RewriteRule ^lostpw$ index.php?do=lostpw [L,QSA]
RewriteRule ^([a-zA-Z]+)$ index.php?do=$1 [L,QSA]
RewriteRule ^([a-zA-Z]+)/proj([0-9]+)$ index.php?do=$1&project=$2 [L,QSA]
RewriteRule ^proj([0-9]+)$ index.php?project=$1 [L,QSA]
</IfModule>