Adding date parameters to ISAPI

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 16
Joined: 10 Jan 2013, 12:24

Adding date parameters to ISAPI

10 Jan 2013, 12:32

Hi,

We've been using ISAPI for a couple of years - great product.

We're looking to see if there is a way of adding a date (to show available offers) to our current ISAPI script? We currently have:

RewriteRule ^holidays/summer/(.+?)/?$ sunholidays/index.asp?Resort=${mapfile:$1}&Season=S [NC,L]

We used to use a parameter '&DeptDate=' - can this be added to the script like this:
RewriteRule ^holidays/summer/(.+?)/?$/Date sunholidays/index.asp?Resort=${mapfile:$1}&Season=S&DeptDate=(.+?) [NC,L]

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Adding date parameters to ISAPI

10 Jan 2013, 16:54

Hello,

Please give an example of incoming and outgoing requests.

Regards
Andrew

User avatar
Posts: 16
Joined: 10 Jan 2013, 12:24

Re: Adding date parameters to ISAPI

16 Jan 2013, 12:22

Thanks Andrew,

Originally had:
/holidays/index.asp?Season=S&Resort=PMI123&aff=&OutDate=060513&duration=14&origin=LHR

Currently have:
/holidays/summer/majorca-balearic-islands/palma-nova/sol-mirlos-tordos

Need to be able to show the departure date, duration and origin in the URL also.

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Adding date parameters to ISAPI

17 Jan 2013, 01:47

You probably want both types of links to work(with and without date/duration/origin), so lets create an additional slightly different rule:

Code: Select all
RewriteRule ^holidays/summer/(\d+)/(\d+)/([^/]+)/(.+?)/?$ sunholidays/index.asp?Resort=${mapfile:$4}&Season=S&OutDate=$1&duration=$2&origin=$3 [NC,L]


This will work for a request like: /holidays/summer/060513/14/LHR/majorca-balearic-islands/palma-nova/sol-mirlos-tordos

Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 51 guests