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: [Help Request]: Wrong syntax Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
daniel_c
Newbie
Newbie


Joined: 18 August 2002
Location: United States
Online Status: Offline
Posts: 17
Posted: 03 February 2011 at 1:47pm | IP Logged Quote daniel_c

Could you help me figuring out what is wrong with this rules/syntax?

RewriteCond User-Agent: .*(?:iphone|ipad|android|mobile/|openweb|cldc\-1|nokia|symbianos|up.link|up.browser|avantgo|sonyericsson|netfront|blackberry|enews\ creator|pg\-c300|palmsource|palm7|palmos|docomo|mib/2|mib/ber|googlebot\-mobile|smartphone|mobilephone|iemobile|t\-mobile|motorola|opera\ mini|samsung\-|vodafone|windows\ ce|midp\-2|midp\-1|opwv|audiovox|sonyericsson|alcatel|sharpreader|320x320|240x320|176x220|320x240|320x448|400x240|240x240|448x320|160x160|440x240).*
RewriteRule (.*) http://m.mysite.com$1 [I,R]


The error is:

Line 17: Unrecognized string: RewriteCond User-Agent: .*(?:iphone|ipad|android|mobile/|openweb|cldc\-1|nokia|symbianos|up.link|up.browser|avantgo|sonyericsson|netfront|blackberry|enews\ creator|pg\-c300|palmsource|palm7|palmos|docomo|mib/2|mib/ber|googlebot\-mobile|smartphone|mobilephone|iemobile|t\-mobile|motorola|opera\ mini|samsung\-|vodafone|windows\ ce|midp\-2|midp\-1|opwv|audiovox|sonyericsson|alcatel|sharpreader|320x320|240x320|176x220|320x240|320x448|400x240|240x240|448x320|160x160|440x240).*
Back to Top View daniel_c's Profile Search for other posts by daniel_c
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 04 February 2011 at 3:41am | IP Logged Quote Anton

That must be due to the spaces in the string.
Instead of escaping them, please consider replacing them with \s sequence.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
daniel_c
Newbie
Newbie


Joined: 18 August 2002
Location: United States
Online Status: Offline
Posts: 17
Posted: 04 February 2011 at 8:40am | IP Logged Quote daniel_c

Work like a charm!
Thank you Anton.
Back to Top View daniel_c's Profile Search for other posts by daniel_c
 

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