Forum menu
Any Web developers ...
 

[Closed] Any Web developers in da house? UrlRewriter/QueryString Q.

Posts: 1642
Free Member
Topic starter
 
[#1137138]

Right. I've got two websites, identical except:

one is file system based and uses Intelligencia's Urlrewriter.

the other is IIS based and uses its own urlrewriter.

The file system based version works fine and all the Urls are rewritten and parsed for their querystrings correctly.

The IIS based version rewrites the Urls correctly but when I come to parse the parameters out the querystrings are not correct.

e.g The web.config contains:
<rule name="DepartmentCategoryPageReWrite" stopProcessing="true">

<match url="^.*-d([0-9]+)/.*-c([0-9]+)/page-([0-9]+)/?$" />

<action type="Rewrite" url="Catalog.aspx?DepartmentId={R:1}&CategoryId={R:2}&Page={R:3}" />

So with a Url of:

http://www.example.com/Test_Department-d1/Test_Category-c1/Page-1/

I'd expect to get three values 1 and 1 and 1.
But I get 1,1 and 1,1 and 1,1

Bu$gered if I know whats going on!


 
Posted : 16/12/2009 9:43 pm
Posts: 0
Free Member
 

lowercase "page" in regex vs "Page" in URL ?


 
Posted : 16/12/2009 9:45 pm
Posts: 0
Free Member
 

Actually that's probably b*ollx as in that case you'd not get any results out.


 
Posted : 16/12/2009 9:48 pm
Posts: 1642
Free Member
Topic starter
 

Hmm, I'll correct that. But when I test this rule in IIS it works fine.


 
Posted : 16/12/2009 9:49 pm