View Full Version : required to type index.html
iflyjetz
12-12-2009, 12:39 PM
Hi Guys,
Not sure if this is the right place but;
For some reason my website returns an error 404 unless I type in the full/index.html after the directory.
Is this a .htaccess issue or anyone have any ideas?
This works:
http://www.getmeonline.ie/fitzsimons/index.html
This does not!
http://www.getmeonline.ie/fitzsimons/
Thanks in advance,
Regards,
iflyjetz
jscheuer1
12-12-2009, 01:49 PM
That, or more likely the server configuration for that domain.
djr33
12-12-2009, 05:12 PM
There is a hierarchy that is supposed to be used in general:
(something like)
index.php (and .asp, etc.)
index.htm
index.html
home.php
home.htm
home.html
If that is not working on your server then it is configured differently. One thing you can try is to figure out what is not working exactly-- that is, try those other names listed above and see if any work. If you find one that does you could try to use .htaccess to redirect. Otherwise I suppose you can make a rewrite rule manually for / to /index.html.
I think that sounds like a server issue (oddly/annoying, though perhaps not "incorrectly", configured). Maybe you can ask your host (or if you have access maybe you can reset that).
It won't be a .htaccess issue unless you actually have a .htaccess file somewhere. It should not be hard to find (either in the folder in question or in the main / folder).
Otherwise, this is a configuration error that might be resolved by faking it with .htaccess, but certainly not caused by it.
iflyjetz
12-14-2009, 06:42 PM
Thanks for the reply guys,
I spoke to my Host who sorted the problem,
FYI, it was:
The problem is being caused by the following RewriteRule in ~/public_html/.htaccess:
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^\.]+)$ /pages/$1.php [NC,L]
Please note that such RewriteRules are applied to all subdirectories as well so even though it is in public_html, it will affect all directories under it. The rule will essentially redirecting http://getmeonline.ie/fitzsimons/ to http://getmeonline.ie/pages/fitzsimons.php which will indeed return a 404 error. As a workaround, I have simply turned the RewriteEngine off in ~/public_html/fitzsimons/.htaccess and the page now appears to load properly.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.