Nope...

You're not matching SPECIFIC strings, you're using regex to match anything
after the /seminar/ 

The URL can be whatever you like

As long as you've got this in your ini file, then you're golder:

[ISAPI_Rewrite]
RewriteRule (.*)/seminar/(.*)/ $1/seminar.cfm?yourvar=$2

This code will take the following:

/seminar/macworld
/seminar/cfunited08
/seminar/nada

and rewrite them to

/seminar.cfm?event=macworld
/seminar.cfm?event=cfunited08
/seminar.cfm?event=nada

The (.*) is the key. Working from the inside out:

.. matches ANY character
* says any number of times
Put those together and it says match any character, any numner of times.

The parens store the matched text into a temp variable to be used with the
$1 or $2.


You grok?


-----Original Message-----
From: Les Mizzell [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 13, 2008 12:19 PM
To: CF-Talk
Subject: Re: a sIMPLER url?

Andy Matthews wrote:
> Doesn't matter. You simply determine what all of the possibilities are 
> and account for them in regex.

Still a little confused:

www.mysite.com/seminar/#EVENT_CODE#

Could be 300 records in the database, with stuff being added and deleted on
an ongoing bases at any time.

So, I'm not sure how I account for that here:
I'd have to write from the database in some way and loop through all the
#event_code# used and add them to the below, correct?

Something like:

[ISAPI_Rewrite]
<cfloop>
   RewriteRule /seminar/(.*)/ /seminar.cfm?name=#event_code# </cfloop>







~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298910
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to