Jump to content

Archived

This topic is now archived and is closed to further replies.

nadz

changing homepage to something other than index

Recommended Posts

hi, ive recently installed the shockarcade on my website. it took me a while but i finally got everything working. the only problem is that all the files have to be in the root directory. the main file for the script is index.php so now when ever someone accesses my site the first page they see is the shockarcade page. ive tried renaming the schock arcade index.php file so that the homepage is my original index.htm but then the games dont work. i need to know how i can change the homepage so that whenever someone accesses my site they see index.htm rather than index.php. any help would be appreciated.

thanks

Share this post


Link to post
Share on other sites
The default page name is set in the Apache configuration file httpd.conf - If you are on anything but a dedicated server, or you run your own server, I doubt your host will alter this.

You might be able to do something with a .htaccess file to alter this in your sites root, or it might even be worth playing with redirects in your scripts. Something like a meta refresh, or maybe with php's header() function?

Share this post


Link to post
Share on other sites
o well, thanks anyway. i was just thinking, my real homepage was an index.htm file but when the index.php file went into the root directory it became the homepage instead, the index.htm file is still there its just no longer the homepage. in the same way is it possible theres another format of webpage that has preference over an index.php file?

Share this post


Link to post
Share on other sites
[!--quoteo(post=356152:date=Mar 18 2006, 01:19 PM:name=nadz)--][div class=\'quotetop\']QUOTE(nadz @ Mar 18 2006, 01:19 PM) [snapback]356152[/snapback][/div][div class=\'quotemain\'][!--quotec--]in the same way is it possible theres another format of webpage that has preference over an index.php file?[/quote]
Again, this would be outlined in httpd.conf - Might be worth asking your host to see what preference order your index files are in.

Share this post


Link to post
Share on other sites
rite, thanks alot ill contact my host and see what he says.

Share this post


Link to post
Share on other sites
Add this line to the .htaccess file in the directory you want:
[code]DirectoryIndex filename.ext
[/code]
Replace "filename" and "ext" to whatever file you want to use as the index page.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.