Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0 support forum
 Helicon Tech : ISAPI_Rewrite 3.0 support forum
Subject Topic: Rewrite problem passing & symbol Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
IDSWizzard
Newbie
Newbie


Joined: 18 September 2008
Location: United States
Online Status: Offline
Posts: 1
Posted: 18 September 2008 at 5:30pm | IP Logged Quote IDSWizzard

I'm working with a various, large keyword set that I am normallizing using ISAPI Rewrite for IIS6.  No problem with the 1,000's of words save for 2 sets.  They are:

S&S Engines and H&W Hitches.

The url is http://www.abc.com/engines/s&s_engines/s&s_engines - twice due to the menu structure (works fine on all others).

Here's the rewrite directive for this:

RewriteRule ^engines/s&s_engines/([^?/]*) /default.aspx?keywords=$1&cat=40&mi=8&si=7 [QSA]

and

RewriteRule ^engines/s%26s_engines/([^?/]*) /default.aspx?keywords=$1&cat=40&mi=8&si=7 [QSA]

When I try to pass the & through as the $1 parameter (either normal or URL encoded), the rewriter passes it through as an &, thus messing up the resultant querystring.  I've also tried putting:

RewriteRule ([^?]+)&(.*) $1%26$2 [NS]

at the beginning to force it to encode after reading, but then I get this as the resulting query string:

keywords=s6s_engines&cat=40&mi=8&si=7 (not sure why the 6 is in there)

I know it's probably a simple request, but has me stumped for the moment.  Any help would be greatly appreciated!

 



__________________
IDSWizzard
Back to Top View IDSWizzard's Profile Search for other posts by IDSWizzard
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4837
Posted: 19 September 2008 at 3:10am | IP Logged Quote Anton

Please try to rewrite your rule like this:

RewriteRule ([^?]+)&(.*) $1\%26$2 [LP]

__________________
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 can vote in polls in this forum