Checking the CURRENT url in ColdFusion
Hi,
I'm trying to program some logic into my application that will check the URL, and if under certain conditions, will redirect appropriately.
For example, sometimes Search engines see the following all as the same thing:
http://www.mydomain.com/index.cfm
What I need to do is ONLY use http://www.mydomain.com. If it's any of the others then I would like to redirect to the correct version using a CFHEADER.
Now...I know this can be done with something like .htaccess, but in this case, I need a CF only version.
If I look at something like #cgi.script_name#, I still cannot determine whether the URL ends in /index.cfm since all URL's above use the actual template, and CF isn't looking at the URL in the address bar, but the actual template being used right then and there.
As for the www's...I haven't a clue if it's even possible.
Many thanks for your help,
Mikey.
