http://httpd.apache.org/docs/2.2/mod/mod_headers.html On Nov 18, 2011 7:45 PM, "Nico Nieuwoudt" <nico.nieuwo...@gmail.com> wrote:
> Hi > > In httpd.conf I would like to add a redirect rule to mobi site for > x-wap-profile http header, similar as for user agent, example: > RewriteCond %{HTTP_USER_AGENT} "iemobile" [NC,OR] > RewriteCond %{HTTP_USER_AGENT} "webOS" [NC] > RewriteRule ^/$ http://ywx.mobi/ [R,L] > > Questions: > 1) I have no idea how to add this rule or what the syntax should be like, > even the reg-ex expression? > What I would like to achive is to redirect to mobi site if x-wap-profile > header contains a xml file. > I've tried these, but no success > RewriteCond %{HTTP_X_WAP_PROFILE} ^.*xml [NC,OR] > RewriteCond %{x-wap-profile} ^.*xml [NC,OR] > > 2) How can I manage to print the x-wap-profile header value in cosole? > > Can someone please guide me with the above 2 questions? > > Thanks > N >