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
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: Mobile redirect Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
dougwilki
Newbie
Newbie


Joined: 28 October 2010
Online Status: Offline
Posts: 18
Posted: 26 October 2011 at 1:31pm | IP Logged Quote dougwilki

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 View dougwilki's Profile Search for other posts by dougwilki
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 27 October 2011 at 1:49am | IP Logged Quote Anton

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 View Anton's Profile Search for other posts by Anton
 
dougwilki
Newbie
Newbie


Joined: 28 October 2010
Online Status: Offline
Posts: 18
Posted: 27 October 2011 at 1:03pm | IP Logged Quote dougwilki

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 View dougwilki's Profile Search for other posts by dougwilki
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 31 October 2011 at 4:42am | IP Logged Quote Anton

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 View Anton's Profile Search for other posts by Anton
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
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