Link to home
Start Free TrialLog in
Avatar of Mike Waller
Mike WallerFlag for United States of America

asked on

index.cfm before index.php

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
Avatar of gr8gonzo
gr8gonzo
Flag of United States of America image

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
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.
Avatar of Mike Waller

ASKER

I tried that but it didn't work.  I'm wondering if I would need to restart railo?
Did you restart Apache after updating the configuratoin? If so, there may be another DirectoryIndex directive somewhere else in your config.
yes, I restarted apache but it still reads the php file first.  I even have a index.html file in there
ASKER CERTIFIED SOLUTION
Avatar of gr8gonzo
gr8gonzo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ok, i'll check on that.
Thanks!