This is a discussion on Mod_rewite HTTP_USER_AGENT with RewriteMap within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hi group, OK so I'm trying to append a query string [QSA] based on a partial user agent match. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi group,
OK so I'm trying to append a query string [QSA] based on a partial user agent match. The match is to distinguish screen based browsers from handheld browsers. Now I'd like to do this through a RewriteMap. At the moment I have this: RewriteMap agent_compact txt:/etc/httpd/conf/sites/useragentCompact.map RewriteCond %{%{HTTP_USER_AGENT}:agent_compact|MISS} !=MISS RewriteRule ^/(.+)$ /$1?mode=${agent_compact:$1|compact} [QSA] However I'm unclear as to the form the *.map file should take, I' assuming something like?: Firefox default up.Browser compact Is this right? I also think my RewriteCond and RewriteRule is flawed. TIA |