Hi Ben,

I think I understand what you mean, and in that particular case I would address 
it by using the actual search engine URL's throughout link tags in the 
application as well (which is what I would do in any case).

Say we have these three pages:

domain.com/products/product.cfm?id=delicious_monkey
domain.com/about/firm.cfm
domain.com/services/requestinfo.cfm

You would set up a series of rewrite rules to handle the different sections, so 
the friend URL's would be:

domain.com/product/delicious_monkey
domain.com/about/firm
domain.com/services/requestinfo

Now, a link to requestinfo.cfm in about/firm.cfm would look like:

<a href="/services/requestinfo">Request Info</a>

So it would be consistently using the friendly URL's, and you would never have 
the issue you're describing, because even if they do come to about/firm.cfm 
from some old external link, their next page would be at the friendly URL. 

Also, the products could've been 
domain.com/products/product.cfm?id=delicious_monkey&category=monkeys and then 
you could simply use this:

domain.com/product/delicious_monkey/in/monkeys

It all depends on the rules you set up. 

Basically, you would no longer use .cfm links anywhere in your site. 

The added flexibility is amazing. Using ISAPI rewrite, you could change the 
entire underlying application go from .cfm to .aspx, and the URL's could stay 
the same. So think good and hard about the URL structure you want, then write 
the right rules for ISAPI Rewrite, and remember you can get great help on the 
ISAPI forums for them pesky little regex syntax.


Jack


>Jack,
>
>Just wanted to add something... We were experimenting with ISAPI rewrite and
>it is awesome. The one issue we had it that from the COldFusion code
>standpoint, you have no idea that any re-write too place. That can be a good
>thing, it can be a bad thing. Let's say you have relative links in your site
>and someone goes to the page:
>
>About/firm.cfm
>
>There might be a link like "../contact.cfm" to go up and to contact. 
>
>Now, let's say that someone gets to that same page via a ISAPI redirect:
>
>Blah/foor/bar/aboutfirm. 
>
>Now, it redirects in IIS to about/firm.cfm , which is how CF sees it, and
>hence has links like "../contact.cfm". However, from the browsers
>standpoint, you are several directories deep and that same link would go to:
>
>Blah/foo/contact.cfm
>
>Which is way off.
>
>So basically, you just have to accept that with ISAPI rewrite, you can't
>have relative links on pages that might be accesseed in these two different
>ways. Also from the CF standpoint, there are no CGI variables available that
>would allow the programmer to know if an re-write was done.
>
>Now, this is with my LIMITED experience so this may be wrong. But it was I
>have found. If I am wrong PLEASE correct me as I really would like to use
>ISAPI rewrite.
>
>
>......................
>Ben Nadel 
>Web Developer
>Nylon Technology
>350 7th Avenue
>Floor 10
>New York, NY 10001
>212.691.1134 x 14
>212.691.3477 fax
>www.nylontechnology.com
> 
>"Some people call me the space cowboy. Some people call me the gangster of
>love."
>
>-----Original Message-----
>From: Jack Dalaa [mailto:[EMAIL PROTECTED] 
>Sent: Friday, June 09, 2006 4:29 AM
>To: CF-Talk
>Subject: Re: User Friendly URLs for dynamic content
>
>For any kind of high volume, you will definitely want to do this on the Web
>server level, on IIS with ISAPI Rewrite (http://www.isapirewrite.com) or
>similar, or on Apache mod_rewrite. Both fairly easy to setup and configure,
>and can do what you're asking, with zero change to your CF app. Much more
>flexible, much more scalable.
>
>My 2 cents.
>
>possiblities?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243135
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to