Redirecting to index.php

design

#1

I have a website that I am developing for a friend off Dreamhost. She had someone do some of the work and then he couldnt finish it off due to some commitments.
Now, I am brand new at php and am dabbling in it but I have a question.

The website is http://rsavia.com and it defaults to the index.php but does not show me the links on the right menu that I would see off http://rsavia.com/index.php
I am in the process of going through some php tutorials but any suggestions would be welcome.

Also, how do I check whether the defaults for the website have index.php included alongwith the index.html and index.htm and all that stuff. I thought dreamhost panel would show that. Thanks for your replies


#2

I’m mightily confused by what I’m seeing. The two pages differ by just a line of code. If one is index.php, what is the other one?


si-blog | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#3

If you have more than one index page in a directory, the html/htm pages would take priority over the php page.
If you feel you may need the html pages at a later date, store them on your computer, and keep just the php page as the index for that directory.
Silk

My website


#4

The weird thing is that I cannot seem to find an alternative page in the OP’s web root. I’ve tried all the various weirdo combinations of index/default/home.html/htm/shtml/php4/php5 etc., and I cannot find one.


si-blog | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#5

I actually have only index.php in there.
No other index.*** files…
Nothing with the default or whatever else…
i used to have an index.html but I took it out so that it would default to the php page…

That’s another reason that I wanted to check the setting for what files would be the default home page for the domain. I know I saw the setting somewhere when I signed up with Dreamhost but just cant recollect where…


#6

Maybe you saw this DH Wiki page, which contain, in part:


The DirectoryIndex command lists all the files Apache should look for (in order) to determine what to display when somebody goes to a URL for a directory. That is, it’s the default file name for your web site. Ours is set to:

DirectoryIndex index.html index.shtml index.htm Index.html Index.htm Index.shtml default.htm Default.htm default.html Default.html default.shtml Default.shtml page1.html index.pl index.cgi index.php index.php3 index.phtml home.htm home.html home.shtml index.wml

As long as you name your “index” file any one of those things, it will work!

If you have two files with names from that list, Apache will show the one that shows up first (e.g. index.html will show up, even if you have an index.php file in the same directory).

You can change your own DirectoryIndex setting to be anything you’d like via an .htaccess file too!

–rlparker


#7

I actually do have the following single line set up in the file .htaccess in the rsavia.com (domain name) directory with the lines

DirectoryIndex index.php index.html index.htm


#8

That doesn’t explain how you can have two different versions of the same page! It’s almost as if there is some sort of residual cache holding the older version of the page. I recommend the following:

  1. Log-in to your site.
  2. Delete the home page index.php (assuming you have a local backup copy).
  3. Upload a new version of index.php that just has some plain text saying “this is a test” or something.
  4. Use your browser to look at http://rsavia.com/ and http://rsavia.com.index.php to see if you get the test page for both.
  5. If they are the same, delete the new index.php and re-upload the index.php that you actually want.

If everything works out, it was probably some sort of cache-related weirdness. If it is still screwy, I recommend reporting the problem to DreamHost, taking care to explain what steps you took to try and remedy the situation.


si-blog | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#9

So there’s no redirects or mod rewrites in the htaccess file?
Silk

My website