Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Coldfusion index.cfm page not loading when typing in the partial root URL

Posted on 2013-01-15
10
1,235 Views
1 Endorsement
Last Modified: 2013-02-07
I have a Coldfusion website that works great except when you type in the partial URL. Then the index.cfm does not load correctly. But when I type the complete path, it works great. for example, www.test.com/lib/index.cfm works great. But when I type in www.test.com/lib/  the page does not load correctly which should as the index.cfm page is the default document. I have tried mappings without luck. Any ideas? CF10 is running on Win 2K3 server with IIS 6.
1
Comment
Question by:dxladner
  • 7
  • 2
10 Comments
 
LVL 36

Expert Comment

by:SidFishes
ID: 38780499
-deleted-
0
 
LVL 16

Expert Comment

by:Gurpreet Singh Randhawa
ID: 38781493
Does it load index.html file

Create one index.html and then inside that file

use the meta tag refresh and set it to 0 and place your url as:  www.test.com/lib/index.cfm

It will work. This is the One way of doing it.

Seconf Option will be to check your IIS settings to list the default.cfm or index.cfm file as the main file to load, Make changes there and it will start working, You may need to start the IIS
0
 

Author Comment

by:dxladner
ID: 38782688
Yes. I created a index.html file and it loads perfectly.
0
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 

Author Comment

by:dxladner
ID: 38782711
I tried your method of using the meta refresh tag but does not as it gets caught in a loop redirect back and forth.
0
 
LVL 16

Expert Comment

by:Gurpreet Singh Randhawa
ID: 38783265
did u tried like this:

<meta http-equiv="refresh" content="0;URL='http://www.test.com/lib/index.cfm'" />
0
 

Author Comment

by:dxladner
ID: 38783568
yes. exactly like that. what happens is the index.html page gets loaded. Then does the redirect to the index.cfm file. So now i have to default pages: index.cfm and index.html. So when I type in the http://www.test.com/lib/  it will not load any pages. When I type http://www.test.com/lib/index.html I get redirected to the index.cfm page. When I type in http://www.tes.com/lib/index.cfm then I go to the index.cfm but no luck with just the http://www.test.com/lib/ nothing loads.
0
 

Author Comment

by:dxladner
ID: 38783591
Hold on, I do get an error that my datasource was not found when I type in just the path, but when I type in the full URL the index.cfm page loads normal. SO it is like when I type in the path only, it cannot see my datasources, but there are there and working as when I type in the full URL, everything works correctly.
Thanks for all of your help! I really appreciate it!
0
 

Author Comment

by:dxladner
ID: 38807965
Still having issues with my website not loading correctly when typing in the partial path. Any ideas??? Anyone??
0
 

Accepted Solution

by:
dxladner earned 0 total points
ID: 38848000
OK. Thanks everyone for the help. Since a different department controls our web server I could not find much help from them. So I had to create something on my own and so I used a redirect within the Application cfc file.

So what I did was run a check on a certain value in the CGI Variables. So when typing just the partial URL, I get a certain path_info value. When this value comes up, I use the <cflocation tag URL="http://www.test.com/lib/index.cfm" >  which then does a redirect to the full absolute path. I placed this in my "On Request Start" function in the Application.cfc file.  

Works great!

D
0
 

Author Closing Comment

by:dxladner
ID: 38863295
I have accepted my own comments as a solution because, I could not get any correct responses and after some time: trail and error, I was able to fix my issue on my own using a cflocation tag within the OnRequestStart function in my Application.cfc which redirects to the full absolute path to my index.cfm page.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question