Forum Moderators: phranque
On Apache you specify which files can be index files in httpd.conf..
<IfModule mod_dir.c>
DirectoryIndex index.html index.php
</IfModule>
That way the index.php file should get server when no index.html file is present - no redirection required.
Not sure about the search engines tho. I would hope they would have the sense to just list you as www.mysite.com but who knows?
Another little thing I do is I don't actually specify the file (index.html or index.php or whatever) in any of my links, just the directory.
e.g.
<a href="/">Home</a>
<a href="/products/">Our Products</a>
That way I can use html or php, and its less hassle to switch to a different language in the future if required.
>>Another little thing I do is I don't actually specify the file (index.html or index.php or whatever) in any of my links, just the directory.
Yes, I use "/" for all home page links. It's just that, since I changed to PHP, Google started listing the home page with the index.php at the end of the url. I guess because it gets redirected there.
I'm tempted to just go back to index.html since the only PHP on the home page pulls my main nave menu, which I could just make static. The rest of the site is completely dynamic.
I'm just wondering if this has affected me adversely. I dropped bigtime in the update, but so did many others.
What I'll do is use your suggestion to make index.php the default home page and then do the header check again. If I get 200, I should be okay and Google should list me normally again, right?
I'm a bit confused on this but I surely don't want my home page to be a 301. I'll let you know how it goes. Thanks Graham and Doc!