You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by tina exner <te...@picturesafe.de> on 2007/07/17 14:39:32 UTC

[users@httpd] RewriteRule Problem

hi,

I have the below RewriteRules configured in my httpd.conf (Apache 
Version 2.0.54)
But i never reach the site XY1, because:
(rewrite.log)...explicitly forcing redirect with...
I changed the Flags but it still doesn´t work.
How do i have to configure it to work correctly ?

RewriteCond %{HTTP_USER_AGENT} .*nokia.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*sharp.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*sonyericsson.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*mot-.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*samsung.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*sgh-.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*sagem.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*panasonic.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*symbian.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*symbian*.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*windows.ce*.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*pocket.pc.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*opera.mini.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*midp.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*vodafone.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*pda.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*mda.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*xda.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*sda.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*240x320.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*benq.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*portalmmm.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*blackberry.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*philips.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .*safari.* [NC,OR]
RewriteRule ^/$ http://www.domain.de/XY2/ [L]

RewriteRule ^/$ http://www.domain.de/XY1/ [R,L]


thx for your help.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] RewriteRule Problem

Posted by Martijn <sw...@googlemail.com>.
On 7/17/07, tina exner <te...@picturesafe.de> wrote:
> I have the below RewriteRules configured in my httpd.conf (Apache
> Version 2.0.54)
> But i never reach the site XY1, because:
> (rewrite.log)...explicitly forcing redirect with...
> I changed the Flags but it still doesn´t work.
> How do i have to configure it to work correctly ?
>
> RewriteCond %{HTTP_USER_AGENT} .*nokia.* [NC,OR]
[..]
> RewriteCond %{HTTP_USER_AGENT} .*safari.* [NC,OR]
> RewriteRule ^/$ http://www.domain.de/XY2/ [L]
>
> RewriteRule ^/$ http://www.domain.de/XY1/ [R,L]

What if you remove the ,OR from the last RewriteCond?

Martijn.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org