Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

hide cfm extention

Guest
Jun 04, 2008 Jun 04, 2008
Hi is it posible to either hide the cfm extention or maybe get IIS to add it on request.

what i need is if a user types in to browser www.mywebsite.com/sports (this will be a dynamic page created by a user)

then it adds the .cfm to the end

any ideas?
647
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 04, 2008 Jun 04, 2008

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 04, 2008 Jun 04, 2008
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

Michael
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources