Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x support forum
 Helicon Tech : ISAPI_Rewrite 2.x support forum
Subject Topic: Mobile Redirect Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
superspidey999
Newbie
Newbie


Joined: 17 June 2008
Online Status: Offline
Posts: 4
Posted: 17 June 2008 at 10:29am | IP Logged Quote superspidey999

Hello,
      I have been trying to have a mobile redirect launched on our website, I have the following questions

1)I have this rule which is not working ( from you forum)

RewriteCond Host: ((?:www\.)?oursite\.com)
RewriteCond User-Agent: (?:AU-MIC|AUDIOVOX|Alcatel|BlackBerry|Blazer|Danger hiptop|DoCoMo/|Ericsson|Googlebot-Mobile|MSN\sMobile\sProxy|Handheld|iPhone|iPod|Klondike|LG-|LGE-|\sLGE\s|MOT-|NetFront|Nokia|Opera\sMini|PalmOS|PalmSource|Panasonic-|SAGEM-|SAMSUNG|SGH-|SHARP-|SIE-|Samsung-|Smartphone|Sony|Symbian\sOS|Windows\sCE|nokia|portalmmm|Profile/MIDP-|UP\.Link|UP\.Browser)
RewriteRule (.*) http\://mobile.oursite.com/ [I,R]

I tried this but it didnt work , actually I am using firefox user agent switcher but it is redirecting even though its not a mobile browser like for IE, Firefox etc

2) What would be the executing time for the above ISAPI rule ? , the reason I am asking this is that Our site has high traffic and having a rule on ISAPI will have an Impact on the processing time and I have my ini file in the root , it looks like the every request will go through the ISAPI filter right? , is there a way to apply this rule only to the home page

Please help..., I really appreaciate you help

Thanks,

 

Back to Top View superspidey999's Profile Search for other posts by superspidey999
 
Lexey
Moderator Group
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Online Status: Offline
Posts: 7468
Posted: 17 June 2008 at 12:27pm | IP Logged Quote Lexey

1) Try this rule:
RewriteCond Host: ((?:www\.)?oursite\.com)
RewriteCond User-Agent: (?:AU-MIC|AUDIOVOX|Alcatel|BlackBerry|Blazer|Danger\shiptop|DoCoMo/|Ericsson|Googlebot-Mobile|MSN\sMobile\sProxy|Handheld|iPhone|iPod|Klondike|LG-|LGE-|\sLGE\s|MOT-|NetFront|Nokia|Opera\sMini|PalmOS|PalmSource|Panasonic-|SAGEM-|SAMSUNG|SGH-|SHARP-|SIE-|Samsung-|Smartphone|Sony|Symbian\sOS|Windows\sCE|nokia|portalmmm|Profile/MIDP-|UP\.Link|UP\.Browser).*
RewriteRule .* http\://mobile.oursite.com/ [I,R]

2) You could estimate rule's execution time with the help of RXTest utility. Usually it is less then 10ms.
There is no direct way to apply this rule to the home page only. But you could write a simplier (ad faster) rule that will stop processing for all URIs except the home page URL. For example:

RewriteRule (?!/index\.html).* $0 [I,L] will stop processing if URI is not /index.html*
This rule should be placed before the first rule.
Back to Top View Lexey's Profile Search for other posts by Lexey
 

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