This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: Mobile redirect
Author
Message |
dougwilki
Newbie


Joined: 28 October 2010
Posts: 18
Posted: 26 October 2011 at 1:31pm

I am using isapi 2.X

I would like to re-write a host and redirect based on device type.

if you are a android:

from: www-stg.airline.com

to http://www-dev2.airline.com/mobile

If you are a iphone:

from: www-stg.airline.com

to http://www-dev3.airline.com/mobile

This does not work:

RewriteCond Host: www-stg\.airline\.com
RewriteCond User-Agent: (?:.*Android.*)

RewriteRule (.*) http://www-dev2.airline/mobile/app.aspx [I,L,R]

RewriteCond Host: www-stg\.airline\.com
RewriteCond User-Agent: (?:.*iphone.*)

RewriteRule (.*) http://www-dev3.airline/mobile/app.aspx [I,L,R]

Any help would be greatly appreciated.

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 27 October 2011 at 1:49am

When you say "This does not work", does it mean you get an error or you get no result at all?

Please try your config with some changes:

RewriteCond Host: www-stg\.airline\.com
RewriteCond User-Agent: .*Android.*
RewriteRule .* http\://www-dev2.airline.com/mobile/app.aspx [I,RP]

RewriteCond Host: www-stg\.airline\.com
RewriteCond User-Agent: .*iphone.*
RewriteRule .* http\://www-dev3.airline.com/mobile/app.aspx [I,RP]

Also please check httpd.parse.errors file for possible error messages.

__________________
Regards,
Anton
Back to Top
 
dougwilki
Newbie


Joined: 28 October 2010
Posts: 18
Posted: 27 October 2011 at 1:03pm

I tried the updated rules and no redirect takes place in either device Iphone or android. Not able to locate httpd.parse.errors file
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 31 October 2011 at 4:42am

Do you have any other rules working, meaning do you know ISAPI_Rewrite operates correctly?
Have you tested it with some simple rule like

RewriteRule /testtest http\://www.google.com [I,RP]

__________________
Regards,
Anton
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum