-
Notifications
You must be signed in to change notification settings - Fork 0
/
rewrite_seo.conf
executable file
·191 lines (170 loc) · 8.69 KB
/
rewrite_seo.conf
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
RewriteEngine on
RewriteLogLevel 9
RewriteLog /home/y/logs/yapache/r.log
RewriteCond %{ENV:Y_mobile_device_type} =Desktop [nocase]
RewriteCond %{HTTP_HOST} ([a-z]+)(-[a-z]+).stage.([a-z]+).yahoo.com [NC,OR]
RewriteCond %{HTTP_HOST} ([a-z]+).stage.([a-z]+).yahoo.com
RewriteCond %{SERVER_PORT} 443
RewriteRule - http://%{HTTP_HOST}%{REQUEST_URI}?%{QUERY_STRING} [NE,L]
#Index page based rules i.e. page=home
RewriteCond %{ENV:Y_mobile_device_type} =Desktop [nocase]
RewriteCond %{REQUEST_URI} ^/kb/index$
RewriteCond %{QUERY_STRING} page=home
RewriteCond %{QUERY_STRING} y=(PROD([_A-Z]+)([_A-Z0-9]+)) [OR]
RewriteCond %{QUERY_STRING} y=(PROD[_A-Z]+) [OR]
RewriteCond %{QUERY_STRING} !y=(PROD([_A-Z]+)([_A-Z0-9]+))
RewriteCond %{QUERY_STRING} !y=(PROD[_A-Z]+)
RewriteCond %{QUERY_STRING} locale=([a-z]+_[A-Z]+)
RewriteMap locale1 "txt:/home/y/conf/yapache22/common/locale.txt"
RewriteRule (.*) ${locale1:%1|https://stage-help.yahoo.com/kb}/helpcentral? [NE,L]
RewriteCond %{ENV:Y_mobile_device_type} =Desktop [nocase]
RewriteCond %{HTTP_HOST} !([a-z]+)(-[a-z]+).stage.([a-z]+).yahoo.com
RewriteCond %{HTTP_HOST} !([a-z]+).stage.([a-z]+).yahoo.com
RewriteCond %{REQUEST_METHOD} =GET
RewriteCond %{REQUEST_URI} ^/kb/index$ [OR]
RewriteCond %{REQUEST_URI} ^/kb$
RewriteCond %{QUERY_STRING} ^$ [OR]
RewriteCond %{QUERY_STRING} page=home
RewriteCond %{QUERY_STRING} !locale=([a-z]+_[A-Z]+)
RewriteCond %{QUERY_STRING} y=(PROD([_A-Z]+)([_A-Z0-9]+)) [OR]
RewriteCond %{QUERY_STRING} y=(PROD[_A-Z]+) [OR]
RewriteCond %{QUERY_STRING} !y=(PROD([_A-Z]+)([_A-Z0-9]+))
RewriteCond %{QUERY_STRING} !y=(PROD[_A-Z]+)
RewriteMap ipcountry "txt:/home/y/conf/yapache22/common/ip_country.txt"
RewriteRule (.*) ${ipcountry:%{ENV:IPCOUNTRY}|https://stage-help.yahoo.com/kb}/helpcentral? [NE,L]
RewriteCond %{ENV:Y_mobile_device_type} =Desktop [nocase]
RewriteCond %{HTTP_HOST} ([a-z]+)(-[a-z]+).stage.([a-z]+).yahoo.com [NC,OR]
RewriteCond %{HTTP_HOST} ([a-z]+).stage.([a-z]+).yahoo.com
RewriteCond %{REQUEST_URI} ^/kb/index$ [OR]
RewriteCond %{REQUEST_URI} ^/kb/helpcentral$
RewriteCond %{QUERY_STRING} page=home
RewriteCond %{QUERY_STRING} !locale=([a-z]+_[A-Z]+)
RewriteCond %{QUERY_STRING} y=(PROD([_A-Z]+)([_A-Z0-9]+)) [OR]
RewriteCond %{QUERY_STRING} y=(PROD[_A-Z]+) [OR]
RewriteCond %{QUERY_STRING} !y=(PROD([_A-Z]+)([_A-Z0-9]+))
RewriteCond %{QUERY_STRING} !y=(PROD[_A-Z]+)
RewriteRule (.*) http://%{HTTP_HOST}/kb/helpcentral? [NE,L]
#RewriteCond %{ENV:Y_mobile_device_type} =Desktop [nocase]
#RewriteCond %{HTTP_HOST} stage.help.yahoo.com [NC]
#RewriteCond %{REQUEST_URI} ^/kb/index$ [OR]
#RewriteCond %{REQUEST_URI} ^/kb/helpcentral$
#RewriteCond %{QUERY_STRING} page=home
#RewriteCond %{QUERY_STRING} y=(PROD([_A-Z]+)([_A-Z0-9]+)) [OR]
#RewriteCond %{QUERY_STRING} y=(PROD[_A-Z]+) [OR]
#RewriteCond %{QUERY_STRING} !y=(PROD([_A-Z]+)([_A-Z0-9]+)) [OR]
#RewriteCond %{QUERY_STRING} !y=(PROD[_A-Z]+)
#RewriteCond %{QUERY_STRING} !locale=([a-z]+_[A-Z]+) [OR]
#RewriteCond %{QUERY_STRING} locale=en_US
#RewriteCond %{ENV:IPCOUNTRY} =US [NC]
#RewriteRule (.*) http://stage.help.yahoo.com/kb/helpcentral? [NE,L]
#Product based rules i.e. page=product
RewriteCond %{ENV:Y_mobile_device_type} =Desktop [nocase]
RewriteCond %{REQUEST_URI} ^/kb/index$
RewriteCond %{QUERY_STRING} page=product
RewriteCond %{QUERY_STRING} !locale=([a-z]+_[A-Z]+)
RewriteCond %{QUERY_STRING} y=(PROD([_A-Z]+))
RewriteMap product "txt:/home/y/conf/yapache22/common/product.txt"
RewriteRule (.*) http://%{HTTP_HOST}/kb/${product:%1|PROD_MAIL}? [NE,L]
RewriteCond %{ENV:Y_mobile_device_type} =Desktop [nocase]
RewriteCond %{REQUEST_URI} ^/kb/index$
RewriteCond %{QUERY_STRING} page=product
RewriteCond %{QUERY_STRING} !y=(PROD([_A-Z]+)([_A-Z0-9]+)) [OR]
RewriteCond %{QUERY_STRING} !y=(PROD[_A-Z]+)
RewriteCond %{QUERY_STRING} locale=([a-z]+_[A-Z]+)
RewriteMap locale1 "txt:/home/y/conf/yapache22/common/locale.txt"
RewriteRule (.*) ${locale1:%1|https://stage-help.yahoo.com/kb}/helpcentral? [NE,L]
RewriteCond %{ENV:Y_mobile_device_type} =Desktop [nocase]
RewriteCond %{REQUEST_URI} ^/kb/index$
RewriteCond %{QUERY_STRING} page=product
RewriteCond %{QUERY_STRING} y=(PROD([_A-Z]+)([_A-Z0-9]+)) [OR]
RewriteCond %{QUERY_STRING} y=(PROD[_A-Z]+)
RewriteCond %{QUERY_STRING} locale=([a-z]+_[A-Z]+)
RewriteMap locale1 "txt:/home/y/conf/yapache22/common/locale.txt"
RewriteRule (.*) ${locale1:%1|https://stage-help.yahoo.com/kb} [NE,QSA]
RewriteCond %{QUERY_STRING} page=product
RewriteCond %{QUERY_STRING} locale=([a-z]+_[A-Z]+)
RewriteCond %{QUERY_STRING} y=(PROD([_A-Z]+)([_A-Z0-9]+)) [OR]
RewriteCond %{QUERY_STRING} y=(PROD[_A-Z]+)
RewriteMap product "txt:/home/y/conf/yapache22/common/product.txt"
RewriteRule (.*) $1/${product:%1|PROD_MAIL}? [NE,L]
#Article based rules i.e. page=content
RewriteCond %{ENV:Y_mobile_device_type} =Desktop [nocase]
RewriteCond %{REQUEST_URI} ^/kb/index$
RewriteCond %{QUERY_STRING} !token=([a-zA-Z0-9]+)
RewriteCond %{QUERY_STRING} !i=([a-zA-Z0-9/=]+)
RewriteCond %{QUERY_STRING} page=content
RewriteCond %{QUERY_STRING} !actp=search
RewriteCond %{QUERY_STRING} !locale=([a-z]+_[A-Z]+)
RewriteCond %{QUERY_STRING} !y=(PROD([_A-Z]+)([_A-Z0-9]+)) [OR]
RewriteCond %{QUERY_STRING} !y=(PROD[_A-Z]+)
RewriteCond %{QUERY_STRING} id=(([A-Z]{2,6})[0-9]+)
RewriteRule (.*) http://%{HTTP_HOST}/kb/%1.html?impressions=true [NE,L]
RewriteCond %{ENV:Y_mobile_device_type} =Desktop [nocase]
RewriteCond %{REQUEST_URI} ^/kb/index$
RewriteCond %{QUERY_STRING} !token=([a-zA-Z0-9]+)
RewriteCond %{QUERY_STRING} !i=([a-zA-Z0-9/=]+)
RewriteCond %{QUERY_STRING} page=content
RewriteCond %{QUERY_STRING} !actp=search
RewriteCond %{QUERY_STRING} !y=(PROD([_A-Z]+)([_A-Z0-9]+)) [OR]
RewriteCond %{QUERY_STRING} !y=(PROD[_A-Z]+)
RewriteCond %{QUERY_STRING} locale=([a-z]+_[A-Z]+)
RewriteMap locale1 "txt:/home/y/conf/yapache22/common/locale.txt"
RewriteRule (.*) ${locale1:%1|https://stage-help.yahoo.com/kb?} [NE,QSA]
RewriteCond %{QUERY_STRING} page=content
RewriteCond %{QUERY_STRING} !i=([a-zA-Z0-9/=]+)
RewriteCond %{QUERY_STRING} !actp=search
RewriteCond %{QUERY_STRING} !token=([a-zA-Z0-9]+)
RewriteCond %{QUERY_STRING} !y=(PROD([_A-Z]+)([_A-Z0-9]+)) [OR]
RewriteCond %{QUERY_STRING} !y=(PROD[_A-Z]+)
RewriteCond %{QUERY_STRING} locale=([a-z]+_[A-Z]+)
RewriteCond %{QUERY_STRING} id=(([A-Z]{2,6})[0-9]+)
RewriteRule (.*) $1/%1.html?impressions=true [NE,L]
RewriteCond %{ENV:Y_mobile_device_type} =Desktop [nocase]
RewriteCond %{REQUEST_URI} ^/kb/index$
RewriteCond %{QUERY_STRING} !token=([a-zA-Z0-9]+)
RewriteCond %{QUERY_STRING} !i=([a-zA-Z0-9/=]+)
RewriteCond %{QUERY_STRING} page=content
RewriteCond %{QUERY_STRING} !actp=search
RewriteCond %{QUERY_STRING} !locale=([a-z]+_[A-Z]+)
RewriteCond %{QUERY_STRING} y=(PROD([_A-Z]+)([_A-Z0-9]+)) [OR]
RewriteCond %{QUERY_STRING} y=(PROD[_A-Z]+)
RewriteMap product "txt:/home/y/conf/yapache22/common/product.txt"
RewriteRule (.*) $1/${product:%1|PROD_MAIL} [NE,QSA]
RewriteCond %{QUERY_STRING} !token=([a-zA-Z0-9]+)
RewriteCond %{QUERY_STRING} !i=([a-zA-Z0-9/=]+)
RewriteCond %{QUERY_STRING} page=content
RewriteCond %{QUERY_STRING} !actp=search
RewriteCond %{QUERY_STRING} !locale=([a-z]+_[A-Z]+)
RewriteCond %{QUERY_STRING} y=(PROD([_A-Z]+)([_A-Z0-9]+)) [OR]
RewriteCond %{QUERY_STRING} y=(PROD[_A-Z]+)
RewriteCond %{QUERY_STRING} id=(([A-Z]{2,6})[0-9]+)
RewriteRule ^/kb/index/(.*) http://%{HTTP_HOST}/kb/$1/%1.html?impressions=true [NE,L]
RewriteCond %{ENV:Y_mobile_device_type} =Desktop [nocase]
RewriteCond %{REQUEST_URI} ^/kb/index$
RewriteCond %{QUERY_STRING} !token=([a-zA-Z0-9]+)
RewriteCond %{QUERY_STRING} !i=([a-zA-Z0-9/=]+)
RewriteCond %{QUERY_STRING} page=content
RewriteCond %{QUERY_STRING} !actp=search
RewriteCond %{QUERY_STRING} y=(PROD([_A-Z]+)([_A-Z0-9]+)) [OR]
RewriteCond %{QUERY_STRING} y=(PROD[_A-Z]+)
RewriteCond %{QUERY_STRING} locale=([a-z]+_[A-Z]+)
RewriteMap locale1 "txt:/home/y/conf/yapache22/common/locale.txt"
RewriteRule (.*) ${locale1:%1|https://stage-help.yahoo.com/kb?} [NE,QSA]
RewriteCond %{QUERY_STRING} !token=([a-zA-Z0-9]+)
RewriteCond %{QUERY_STRING} !i=([a-zA-Z0-9/=]+)
RewriteCond %{QUERY_STRING} page=content
RewriteCond %{QUERY_STRING} !actp=search
RewriteCond %{QUERY_STRING} locale=([a-z]+_[A-Z]+)
RewriteCond %{QUERY_STRING} y=(PROD([_A-Z]+)([_A-Z0-9]+)) [OR]
RewriteCond %{QUERY_STRING} y=(PROD[_A-Z]+)
RewriteMap product "txt:/home/y/conf/yapache22/common/product.txt"
RewriteRule (.*) $1/${product:%1|PROD_MAIL} [NE,QSA]
RewriteCond %{QUERY_STRING} !token=([a-zA-Z0-9]+)
RewriteCond %{QUERY_STRING} !i=([a-zA-Z0-9/=]+)
RewriteCond %{QUERY_STRING} page=content
RewriteCond %{QUERY_STRING} !actp=search
RewriteCond %{QUERY_STRING} locale=([a-z]+_[A-Z]+)
RewriteCond %{QUERY_STRING} y=(PROD([_A-Z]+)([_A-Z0-9]+)) [OR]
RewriteCond %{QUERY_STRING} y=(PROD[_A-Z]+)
RewriteCond %{QUERY_STRING} id=(([A-Z]{2,6})[0-9]+)
RewriteRule (.*) $1/%1.html?impressions=true [NE,L]