I wanted to share this with you folks, don't know if it has been covered but I didn't find anything in the archives so forgive me if this is old news. It solved lots of frustration on my behalf.
I am moving a rather large portal (the one in my signature) from a CF 5 Ent to CFMX Ent. Now, I have used "friendly urls" extensively. Ie, instead of using http://www.hypography.com/article.cfm?id=32554 I would use http://www.hypography.com/article.cfm/32554.html And then just parse the variables in the Application.cfm file. Now, the problem was that with CFMX on IIS, any browser requesting a friendly URL will get a non-server-specific error, like "Server not found", "network error" or whatever. It would not generate a server error and you could not catch it. So, if I upgraded the site all the search engines would point to pages which do in fact exist, but which the server is unable to serve, so the user will think your server is gone and all your hard work getting your pages indexed is wasted. The solution was rather simple, but I spent ages finding it. In IIS there is a setting in the IIS Management Console. Right click on the "Web Sites" folder, select "Home Directory" and click the "Configuration" button. Click on the entry for .cfm files (or any files you want to catch), and click "Edit". Select "Check that file exists". This simple setting enables you to catch the failed attempt as a 404 (File Not Found) error. Now create an error template in any way you want, either by using a standard CF error template or by pointing the 404 error handler in IIS to your error template (which should be CF or ASP). (PLEASE NOTE: I can't make this work on my home box running CFMX standalone and IIS 5.1 on WinXP Pro, but it does work on a Win2K box). Here's the clue: in this error template, use the CGI.Query_String variable to locate the url the user was trying to get. From it you can parse the CFM file and any variables, which lets you translate it into the correct variable. Now, how to handle the correct URL is another question. Solution 1 would be to use CFLOCATION, but the problem with this is that it is a client-side redirect. Instead, a server side redirect would be useful. I found a tag called CF_FORWARD at the Developer's Exchange which takes any (relative) path and performs a server-side redirect (ie, an execute statement). It works like a charm. Of course, relying on IIS to do anything is a risky thing to do, but htis solution at least makes sure the "friendly urls" everybody were so proud of in previous versions now will work... Hope this made any sense. Feel free to mail me if you need any help with this issue. (Thanks to the support staff at Crystaltech.com for suggesting the Check If File Exists solution.) With kind regards, Tormod Guldvog Editor, Hypography Sci-Tech http://www.hypography.com/ ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

