Results 1 to 4 of 4

Thread: required to type index.html

  1. #1
    Join Date
    Nov 2009
    Posts
    15
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default required to type index.html

    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

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That, or more likely the server configuration for that domain.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    iflyjetz (12-14-2009)

  4. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. The Following User Says Thank You to djr33 For This Useful Post:

    iflyjetz (12-14-2009)

  6. #4
    Join Date
    Nov 2009
    Posts
    15
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •