PDA

View Full Version : wprime & apache rewrite rules


richba5tard
11-13-2009, 15:49
wPrime had an issue with an apache rewrite rule; a redirect caused the post parameters to be dropped.

We redirect all ww.hwbot.org traffic to hwbot.org. Does someone know how to include the original POST parameters in the rule? Or How to exclude one specific url from redirect (http://www.hwbot.org/submit.client.result.do)?

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.hwbot\.org [NC]
RewriteRule ^/(.*) http://hwbot.org/$1 [L,R=301]

Maybe you can specify it should only happen for GET requests, instead of all? But how?

richba5tard
11-13-2009, 16:10
Because if you use the old client to make a submission, you will get a warning that you need to attach a screenshot. It will not automatically proceed, but it will still prepopulate the fields that are ok (score, hardware used, description, etc).