/t5/coldfusion-discussions/hide-cfm-extention/m-p/215516#M19262Jun 04, 2008
Jun 04, 2008
Copy link to clipboard
Copied
Simplest answer is why can't the dynamic page that is created
not have
the .cfm added at that time? This is the way my systems do
it.
There are ways to modify a request after it has been created.
There are
add-on tools that port the Apache mode-rewrite concept to
IIS. Things
can be done with the 404 File Not Found template so that it
does
something with the request before the error is returned to
the client.
A final idea could be to create /sports as a directory. This
is how the
browser would normally see it. Then inside this directory is
a default
file such as index.cfm that is automatically requested by the
web server.
I have never had the need to muck around with the basic HTTP
request-response cycle like this, but I have read about it
before.
/t5/coldfusion-discussions/hide-cfm-extention/m-p/215517#M19263Jun 04, 2008
Jun 04, 2008
Copy link to clipboard
Copied
LATEST
The "correct" way to do this is either with the .htaccess
file or something similar which has just escaped my mind
completely. This does involve use of some regular expressions to
make it work.
The basic alternative would be to have the page at
www.mysite.com/sports/index.cfm when someone goes to www/sports IIS
will recognise it as a directory and look for an index.xxx page.
You may need to check that IIS will look for .cfm files as default
files - if in doubt create an index.htm file if index.cfm doesn't
work. Note you'll need to delete the index.htm file off the
webserver as it may take precedence over the .cfm file