WEB weird htaccess bug?

Discussion in 'OT Technology' started by White Stormy, Apr 28, 2009.

  1. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    I started working on a new project.. a way of procrastinating on something else

    I created an .htaccess file for the directory with nothing in it but
    Code:
    DirectoryIndex index.php
    
    And that gives an error.

    But if the .htaccess is empty.. it loads the index.php file by default just fine.

    If the .htaccess has a space or blank line in it instead of being empty, it gives the error. What's the deal?
     
  2. dazmanultra

    dazmanultra New Member

    Joined:
    Jun 17, 2002
    Messages:
    34,795
    Likes Received:
    0
    Location:
    English Countryside
    Check your web server error logs. If you have cPanel, you should be able to find the logs pertaining to your site in the logs section there.

    What are the permissions on the .htaccess file? It needs to be at least readable by the web server user... try CHMOD'ing to 644.
     
  3. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    tried 644 and 755. neither changed it

    the index.php file was on 644, changed it also to 755 and still nothing changed
     
  4. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    checking for logs now
     
  5. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    um.. what?

     
  6. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    :doh: I fixed it.

    Problem was the encoding format of the .htaccess file. It has to be ANSI. I had it as UTF-8.

    Thanks
     

Share This Page