-
Notifications
You must be signed in to change notification settings - Fork 1
/
htaccess
245 lines (212 loc) · 12.8 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
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# Use PHP5.4 as default
# AddHandler application/x-httpd-php54 .php
# AddHandler php53-fcgi .php
# See https://www.ionos.co.uk/help/hosting/htaccess/available-apache-modules/ for available modules
<IfModule mod_dir.c>
DirectoryIndex index.html index.php
</IfModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/shtml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>
# BEGIN Expire headers
<IfModule mod_expires.c>
# Turn on the module.
ExpiresActive on
# Set the default expiry times.
ExpiresDefault "access plus 2 days"
# Images
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/webp "access plus 1 month"
ExpiresByType image/avif "access plus 1 month"
ExpiresByType image/avif-sequence "access plus 1 month"
ExpiresByType image/svg+xml "access 1 month"
ExpiresByType image/x-icon "access plus 1 month"
ExpiresByType image/ico "access plus 1 month"
# Fonts
ExpiresByType font/ttf "access plus 1 year"
ExpiresByType font/otf "access plus 1 year"
ExpiresByType font/woff "access plus 1 year"
ExpiresByType font/woff2 "access plus 1 year"
ExpiresByType application/font-woff "access plus 1 year"
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
# CSS, JavaScript
ExpiresByType text/css "access plus 1 day"
ExpiresByType text/javascript "access plus 1 day"
ExpiresByType application/javascript "access plus 1 day"
# Html
ExpiresByType text/html "access plus 600 seconds"
</IfModule>
# END Expire headers
# Using ETags will improve the YSlow scores
FileETag none
ErrorDocument 404 /404.html
ErrorDocument 401 /401.html
ErrorDocument 403 /403.html
ErrorDocument 400 /400.html
ErrorDocument 501 /404.html
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} !=443
RewriteRule ^(.*)$ https://orionrobots.co.uk/$1 [R=301,L]
# If the URL points to a real existing item then do nothing
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule (.*) - [L]
## FORUMS
# Forum topics redirect section
RewriteRule "^tiki-forums\.php" /forums [R,L]
RewriteCond %{QUERY_STRING} ^forumId=([0-9]*)$
RewriteRule ^tiki-view_forum\.php /forum%1 [L]
# Topics
RewriteRule "^forum5" /forums/open_discussion? [R,L]
RewriteRule "^forum8" /forums/lego_discussion? [R,L]
RewriteRule "^forum1" /forums/announcements? [R,L]
RewriteRule "^forum2" /forums/electronics? [R,L]
RewriteRule "^forum7" /forums/site_feedback? [R,L]
RewriteRule "^forum6" /forums/robot_market? [R,L]
RewriteRule "^forum11" /forums/vex? [R,L]
RewriteRule "^forum3" /forums/pneumatics_hydraulics? [R,L]
RewriteRule "^forum12" /forums/orion_explorer_1_robot_kit? [R,L]
# Forum topic threads redirect section
RewriteCond %{QUERY_STRING} ^comments_parentId=([0-9]*)$
RewriteRule ^tiki-view_forum_thread\.php /forumthread%1 [L]
# redirects for topic orion_explorer_1_robot_kit
# redirects for topic orion_explorer_1_robot_kit
RewriteRule "^forumthread473(.*)" /forums/orion_explorer_1_robot_kit/welcome_to_the_explorer_1_forum_forum_rules_and_introduction? [R,L]
# redirects for topic lego_discussion
RewriteRule "^forumthread113" /forums/lego_discussion/mindstorms_stormrunner_game? [R,L]
RewriteRule "^forumthread234" /forums/lego_discussion/help_light_chasing_robot? [R,L]
RewriteRule "^forumthread259" /forums/lego_discussion/help_with_adder_subtractor? [R,L]
RewriteRule "^forumthread47" /forums/lego_discussion/lego_mindstorms_a_good_start? [R,L]
RewriteRule "^forumthread238" /forums/lego_discussion/uk_version_of_cybermaster_software_cd? [R,L]
RewriteRule "^forumthread172" /forums/lego_discussion/rcx_ir_malfunction_help? [R,L]
RewriteRule "^forumthread188" /forums/lego_discussion/rcx_tools_wince_for_x86? [R,L]
RewriteRule "^forumthread108" /forums/lego_discussion/is_serial_communication_with_rcx_ports_possible? [R,L]
RewriteRule "^forumthread124" /forums/lego_discussion/lego_ants_simulation? [R,L]
RewriteRule "^forumthread118" /forums/lego_discussion/problem_in_using_rotationnavigator_class? [R,L]
RewriteRule "^forumthread46" /forums/lego_discussion/robotic_telescope? [R,L]
RewriteRule "^forumthread110" /forums/lego_discussion/lego_ris_2_0? [R,L]
RewriteRule "^forumthread68" /forums/lego_discussion/other_robotics_mailing_lists? [R,L]
RewriteRule "^forumthread81" /forums/lego_discussion/waterproof_housing_for_rcx_originally_u? [R,L]
RewriteRule "^forumthread72" /forums/lego_discussion/what_is_that_displayed_on_my_rcx2_0? [R,L]
RewriteRule "^forumthread42" /forums/lego_discussion/balls_for_building_gbc_modules? [R,L]
RewriteRule "^forumthread62" /forums/lego_discussion/rcx_3? [R,L]
RewriteRule "^forumthread39" /forums/lego_discussion/rcx3_can_extra_hardware_functionality_be_added? [R,L]
# redirects for topic site_feedback
RewriteRule "^forumthread439" /forums/site_feedback/was_some_thing_lost_in_the_face_lift? [R,L]
RewriteRule "^forumthread328" /forums/site_feedback/topic_order? [R,L]
RewriteRule "^forumthread320" /forums/site_feedback/how_can_i_edit_my_profile? [R,L]
RewriteRule "^forumthread155" /forums/site_feedback/forum_suggestions? [R,L]
RewriteRule "^forumthread83" /forums/site_feedback/front_page_looked_bad? [R,L]
RewriteRule "^forumthread52" /forums/site_feedback/queing? [R,L]
# redirects for topic pneumatics_hydraulics
RewriteRule "^forumthread178" /forums/pneumatics_hydraulics/help_and_advice? [R,L]
RewriteRule "^forumthread98" /forums/pneumatics_hydraulics/links_to_pneumatic? [R,L]
RewriteRule "^forumthread84" /forums/pneumatics_hydraulics/pneumatic_forces? [R,L]
# redirects for topic vex
RewriteRule "^forumthread169" /forums/vex/vex_robot_from_radio_shack? [R,L]
RewriteRule "^forumthread224" /forums/vex/vex_robotics_questions? [R,L]
# redirects for topic open_discussion
RewriteRule "^forumthread451" /forums/open_discussion/autonomous_robots_navigation? [R,L]
RewriteRule "^forumthread443" /forums/open_discussion/robotic_10? [R,L]
RewriteRule "^forumthread390" /forums/open_discussion/uk_micromouse_2010? [R,L]
RewriteRule "^forumthread373" /forums/open_discussion/robotic_09? [R,L]
RewriteRule "^forumthread367" /forums/open_discussion/variable_surface_curvature_lego_system? [R,L]
RewriteRule "^forumthread357" /forums/open_discussion/uk_micromouse_2009? [R,L]
RewriteRule "^forumthread351" /forums/open_discussion/robot_wars_dvds_and_vhs_recordings? [R,L]
RewriteRule "^forumthread349" /forums/open_discussion/robotic08? [R,L]
RewriteRule "^forumthread337" /forums/open_discussion/uk_micromouse_2008? [R,L]
RewriteRule "^forumthread331" /forums/open_discussion/rise_of_the_robots? [R,L]
RewriteRule "^forumthread327" /forums/open_discussion/uk_robot_competition? [R,L]
RewriteRule "^forumthread324" /forums/open_discussion/role_of_science_fiction_and_the_advancement_of_robotics? [R,L]
RewriteRule "^forumthread322" /forums/open_discussion/robotics_event_in_india? [R,L]
RewriteRule "^forumthread316" /forums/open_discussion/project_aiko_female_android_demo_2? [R,L]
RewriteRule "^forumthread312" /forums/open_discussion/robot_builders_in_the_midlands? [R,L]
RewriteRule "^forumthread303" /forums/open_discussion/my_female_android_robot_project_update? [R,L]
RewriteRule "^forumthread297" /forums/open_discussion/need_some_help? [R,L]
RewriteRule "^forumthread296" /forums/open_discussion/more_mini_sumo? [R,L]
RewriteRule "^forumthread284" /forums/open_discussion/mark_tilden_interview? [R,L]
RewriteRule "^forumthread282" /forums/open_discussion/minisumo_competitions? [R,L]
# redirects for topic robot_market
RewriteRule "^forumthread190" /forums/robot_market/forum_charter? [R,L]
RewriteRule "^forumthread448" /forums/robot_market/kurukshetra_2011_mobile_robotics? [R,L]
RewriteRule "^forumthread447" /forums/robot_market/kurukshetra_2011_scara? [R,L]
RewriteRule "^forumthread279" /forums/robot_market/gimson_robotics_online_store? [R,L]
RewriteRule "^forumthread192" /forums/robot_market/gumstix_linux_machine? [R,L]
RewriteRule "^forumthread153" /forums/robot_market/request_for_parts? [R,L]
RewriteRule "^forumthread92" /forums/robot_market/event_uk_xfm_featherweight_challenge? [R,L]
RewriteRule "^forumthread26" /forums/robot_market/robot_builders_required? [R,L]
# redirects for topic electronics
RewriteRule "^forumthread332" /forums/electronics/i_need_help_with_first_build? [R,L]
RewriteRule "^forumthread258" /forums/electronics/question_from_a_new_member? [R,L]
RewriteRule "^forumthread228" /forums/electronics/cheap_pics_gps_etc? [R,L]
RewriteRule "^forumthread176" /forums/electronics/preferred_microcontrollers? [R,L]
RewriteRule "^forumthread105" /forums/electronics/12vdc? [R,L]
RewriteRule "^forumthread51" /forums/electronics/small_motors? [R,L]
RewriteRule "^forumthread35" /forums/electronics/need_opinions_on_this_robot_controller_system? [R,L]
# redirects for topic announcements
RewriteRule "^forumthread269" /forums/announcements/downloads_fixed? [R,L]
RewriteRule "^forumthread264" /forums/announcements/planned_outtage? [R,L]
RewriteRule "^forumthread231" /forums/announcements/outtage? [R,L]
RewriteRule "^forumthread211" /forums/announcements/dns_outtage? [R,L]
RewriteRule "^forumthread209" /forums/announcements/file_downloads_now_for_registered_users_only? [R,L]
RewriteRule "^forumthread206" /forums/announcements/one_million_views? [R,L]
RewriteRule "^forumthread203" /forums/announcements/anonymous_posting_broken? [R,L]
RewriteRule "^forumthread165" /forums/announcements/upgrade? [R,L]
RewriteRule "^forumthread160" /forums/announcements/outage_confirmed? [R,L]
RewriteRule "^forumthread150" /forums/announcements/forum_features_updated? [R,L]
RewriteRule "^forumthread149" /forums/announcements/spammers_faking_orionrobots_addresses? [R,L]
RewriteRule "^forumthread136" /forums/announcements/possible_outage? [R,L]
RewriteRule "^forumthread107" /forums/announcements/pdf_generation_disabled? [R,L]
RewriteRule "^forumthread61" /forums/announcements/bumpy_ride? [R,L]
RewriteRule "^forumthread31" /forums/announcements/open_comments? [R,L]
RewriteRule "^forumthread28" /forums/announcements/sandbox_disabled? [R,L]
RewriteRule "^forumthread1" /forums/announcements/new_site? [R,L]
# Non tiki
RewriteRule ^blogs?$ archive.html [L]
RewriteRule "^Getting[^_]?Started(.*)" /getting_started.html [R,L]
RewriteRule "^Leonardo.?Da.?Vincis.?Tank(.*)" /wiki/leonardo_da_vincis_tank.html [R]
RewriteRule "^Leonardo.?Da.?Vincis.?Helicopter(.*)" /wiki/leonardo_da_vinci.html [R]
RewriteRule "^Fixing.?A.?Broken.?Wire(.*)" /2004/11/14/fixing-a-broken-wire [R]
RewriteRule "^Lego.?Specifications(.*)" /wiki/lego_specifications.html [R,L]
RewriteRule "^i-Cybie.?Robot.?Dog(.*)" /2004/11/14/i-cybie-robot-dog [R,L]
RewriteRule "^leonardo_da_vincis_tank.html" /wiki/leonardo_da_vincis_tank.html [R,L]
RewriteRule "^Simple.?Parallel.?Port.?LED.?Board" /2004/11/05/simple-parallel-port-led.html [R,L]
RewriteCond %{QUERY_STRING} page=Simple.?Parallel.?Port.?LED.?Board
RewriteRule "^tiki-index.php" /2004/11/05/simple-parallel-port-led.html [R,L]
RewriteRule "^Building.?An.?Experimenting.?Parallel.?Cable" /2004/11/05/simple-parallel-port-led.html [R,L]
RewriteRule "^Apache.?Monitor.?With.?Python.?And.?An.?LED" /2004/11/14/apache-monitor-with-led.html [R,L]
RewriteRule "^Robot.?Stores(.*)" /pages/robot-stores.html [R]
RewriteRule "^Sir.?Killalot(.*)" /2005/03/01/sir-killalot.html [R,L]
RewriteRule "^Robotic.?Gadgets.?And.?Toys(.*)" /2005/08/02/robotics-toys-and-gadgets.html [R,L]
Redirect 301 /HomePage /index.html
RewriteRule "^MegaByte.?Robot.?Dog$" /2004/11/14/megabyte-robot-dog.html [R,NC,L]
RewriteCond %{QUERY_STRING} imageId=122
RewriteRule "^tiki-browse_image.php" /2010/01/19/the-lego-rcx-inside-and-out.html?#photos-of-the-innards [R,L,NE]
RewriteRule ^wiki-([A-Za-z0-9]+) wiki/$1.html [QSA,L]
RewriteRule ^page-([A-Za-z0-9]+) wiki/$1.html [QSA,L]
# Otherwise try appending .html onto it and stop.
RewriteCond %{REQUEST_URI} !.html$
RewriteRule ^/?(.+[^/])/?$ /$1.html
Redirect 301 /wiki/rcx /wiki/lego_rcx.html
Redirect 301 /wiki/rcx.html /wiki/lego_rcx.html
Redirect 301 /wiki/ir /wiki/infra_red.html
Redirect 301 /wiki/ir.html /wiki/infra_red.html
Redirect 301 /wiki/usb.html /wiki/universal_serial_bus.html
Redirect 301 /wiki/servo.html /wiki/servo_motor.html
</IfModule>