Tutorial :Are there any gotchas for url re-writing a ColdFusion site with ISAPI_Rewrite v2?



Question:

I've been asked to help out with some ColdFusion development and one of the tasks will be to undertake url re-writing, mostly turning url parameters into a cleaner url.

The site is on a hosted service with cf8 running on iis, with Helicon Tech ISAPI_Rewrite v2.

Are there any things I should look out for?

Thanks.


Solution:1

This should be fine. IIS (or the ISAPI addin) deals with the URL rewrite and then passes it onto CF as if it were requested as the original URL.

Most people do URL rewriting in order to improve their SERP rankings - key to this is making sure that the original URL that was in place previously now returns a 301 (moved permanently) redirect to your new URL. This preserves the 'link juice' associated with the old URL. Don't use CFLOCATION to do your redirect - that tag does a 302...


Solution:2

I've been using ISAPI_Rewrite and ColdFusion for a few years and had good results.

I would recommend upgrading to version 3 if you can. While version 2 worked fine, I've found the latest version easier to use because it's compatible with mod_rewrite.


Solution:3

The bottom line is that a URL Rewriter and your Application Server (ColdFusion or otherwise) should never have problems working together. If they are, you've probably setup your rewriting rules incorrectly (or are using a crappy rewriter).

The URL Rewriter changes the appearance of the request before it is handed off to the Application Server. As long as the end result is foo.cfm?var=value, whether that be the actual URL or the result of rewriting, it will be fine.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »