Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

index.cfm before index.php

Posted on 2011-04-28
8
Medium Priority
?
394 Views
Last Modified: 2012-05-11
I'm running both apache, php and railo (open source coldfusion) on my linux server.  is there a way on apache force a page to invoke the index.cfm page before the index.php.  Seems like the php page gets displayed before the index.cfm page if both are on the server
0
Comment
Question by:COwebmaster
  • 4
  • 3
8 Comments
 
LVL 35

Expert Comment

by:gr8gonzo
ID: 35486468
There's a line in your Apache config somewhere that is called DirectoryIndex and it should contain all the files that can be used as the "default" file for a folder. You can change the order of preference on that line - just make index.cfm come first before index.php
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 35486517
No points for this comment, but if you are experimenting around with this, try index.html and see if that doesn't take precedence over the other two.  A nice feature of that kind of script ordering is that you can have an index.html and an index.php script.  The index.php script can be very elaborate, creating all kinds of neat stuff on the fly.  If you're interested in performance, and the index.php script is slow, it can capture its output buffers and write them into the index.html file.  Then you have a fast static page.  A cron job or other trigger can be used to load the index.php page, or you can simply delete the index.html page every few minutes.  Now you have a near-real-time web site with high performance.
0
 

Author Comment

by:COwebmaster
ID: 35486523
I tried that but it didn't work.  I'm wondering if I would need to restart railo?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 35

Expert Comment

by:gr8gonzo
ID: 35486661
Did you restart Apache after updating the configuratoin? If so, there may be another DirectoryIndex directive somewhere else in your config.
0
 

Author Comment

by:COwebmaster
ID: 35486757
yes, I restarted apache but it still reads the php file first.  I even have a index.html file in there
0
 
LVL 35

Accepted Solution

by:
gr8gonzo earned 2000 total points
ID: 35486861
Either you have another DirectoryIndex file somewhere in your config, or you have an .htaccess file in that directory (or in a directory above it) - the .htaccess files (which are sometimes hidden files) can override the other Apache config so sometimes those can have DirectoryIndex lines, too.
0
 

Author Comment

by:COwebmaster
ID: 35487080
ok, i'll check on that.
0
 

Author Closing Comment

by:COwebmaster
ID: 35838598
Thanks!
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

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

Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses
Course of the Month21 days, 1 hour left to enroll

810 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