EasyCFM.COM ColdFusion Forums / Coding Help! / About the Cfm Files

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: About the Cfm Files

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

125pr
11-13-2005 @ 3:32 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Junior Member
Posts: 68
Joined: Oct 2005

hi, all this time I hope that definately i will get the answer from someone, ihave created a website as i have already disscussed over here, i just wannt that when i navigate from one to another page, the pages over the ADRESS BAR should not show the .cfm extention with the filename, if this is possible, please let me know thanks



Hope will Build

This message was edited by 125pr on 11-13-05 @ 3:32 AM

kicker
11-13-2005 @ 5:38 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 717
Joined: Oct 2004

This will only help if you are able to do all three of the following:
You need access to the Apache httpd.conf file OR the IIS6 MMC Snap in
You need access to the Coldfusion default-web.xml
and you must be able to restart the ColdFusion and Apache service.
There is a newly posted tutorial that is on easycfm that discuss this method. As far as I know there is no other way. So here you go:


http://tutorial412.easycfm.com/

Hope this helps.

maquiladoras
11-13-2005 @ 2:38 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 2073
Joined: Dec 2002

I wrote that tutorial,
if you use apache you can also use mod rewrite
though theres some debate about the impact it will have on the apache process

heres an example rewrite condition


RewriteEngine On

RewriteCond %{REQUEST_FILENAME}.cfm -f
RewriteRule . %{REQUEST_FILENAME}.cfm%{PATH_INFO} [L]

RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /default.cfm [L]


What this does is take any file and sees if a cfm file exists, if it doesnt, it forwards it to default.cfm


so say you have
MyPage.cfm
you upload it
and with this rule you do
http://www.mySite.com/MyPage
Apache will then call MyPage.cfm
however if it doesn't exist it goes to default.cfm

Where as in my tutorial you upload a file called MyPage rather than MyPage.cfm
hope that helps.

-
"There is no justice, There is Just Us"
-


Website Designed and Developed by Pablo Varando.