Adding date parameters to ISAPI
4 posts
• Page 1 of 1
Adding date parameters to ISAPI
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]
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]
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Adding date parameters to ISAPI
Hello,
Please give an example of incoming and outgoing requests.
Regards
Andrew
Please give an example of incoming and outgoing requests.
Regards
Andrew
Re: Adding date parameters to ISAPI
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.
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.
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Adding date parameters to ISAPI
You probably want both types of links to work(with and without date/duration/origin), so lets create an additional slightly different rule:
This will work for a request like: /holidays/summer/060513/14/LHR/majorca-balearic-islands/palma-nova/sol-mirlos-tordos
Regards
Andrew
- 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
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 51 guests