301 Call redirection error
I need to redirect my site, say:
to
In this application, index.cfm is my default page (set in IIS). When I try to redirect 301 I get a redirect loop error. The entire application is in ColdFusion. I am updating this setting in IIS in my index.cfm page. Please give some advice on this. Thanks adv.
So, in IIS, your default setting for the page looks like index.cfm? I think you are getting a redirect loop because the server http://www.foo.com/index.cfm is the same as http://www.foo.com .
Sounds like you just want to hide "index.cfm" from being displayed to the user?
In this case, I don't think trying to use a 301 redirect is the way to go.
You might want to take a look at the IIS 7 URL Rewrite feature and take a look at approach # 3
a source to share
Well, I don't know coldfusion, but you can only set the output of the 301 header if the url used to access the script index.cfm has any character on it (only if the request method is GET), thus you avoid endless redirects. Here are some pseudo-codes to explain myself:
if URL is not 'http://www.foo.com' and method is 'GET'
output header '301 http://www.foo.com/'
a source to share