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: [Help Request]: Wrong syntax
Author
Message |
daniel_c
Newbie


Joined: 18 August 2002
Location: United States
Posts: 17
Posted: 03 February 2011 at 1:47pm

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
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 04 February 2011 at 3:41am

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
 
daniel_c
Newbie


Joined: 18 August 2002
Location: United States
Posts: 17
Posted: 04 February 2011 at 8:40am

Work like a charm!
Thank you 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