Results 1 to 16 of 16

Thread: Apache Server Not Using .htaccess

  1. #1
    Senior Member ajbrun's Avatar
    Join Date
    Apr 2004
    Location
    York, England
    Posts
    4,840
    Thanks
    4
    Thanked
    25 times in 13 posts

    Unhappy Apache Server Not Using .htaccess

    My Apache HTTP Server (version 2.0.55) doesn't seem to be reading a .htaccess file I've put in a directory.

    In my httpd.conf file, I have every mention of the command "AllowOverride" set to "All", and "AccessFileName" is set to ".htaccess".

    My .htaccess file currently contains the command "deny from all", which I know is supposed to stop files in that directory from being viewed. I know it works since I've tried it on another server.

    Anyone got any idea on how to fix this?

    Thanks .

  2. #2
    Agent of the System ikonia's Avatar
    Join Date
    May 2004
    Location
    South West UK (Bath)
    Posts
    3,736
    Thanks
    39
    Thanked
    75 times in 56 posts
    post your httpd.conf - its the only way to work it through really
    It is Inevitable.....


  3. #3
    Ah, Mrs. Peel! mike_w's Avatar
    Join Date
    Oct 2003
    Location
    Hertfordshire, England
    Posts
    3,326
    Thanks
    3
    Thanked
    9 times in 7 posts
    Not sure if it is the same, assuming you're not on Debian, but... do you have a directory called sites-available? If so, what are the contents?
    "Well, there was your Uncle Tiberius who died wrapped in cabbage leaves but we assumed that was a freak accident."

  4. #4
    Senior Member ajbrun's Avatar
    Join Date
    Apr 2004
    Location
    York, England
    Posts
    4,840
    Thanks
    4
    Thanked
    25 times in 13 posts
    http://ajbrun.homeip.net/httpd.conf

    There you go .

    It's windows btw, and the contents of the folder 'website' is here: http://ajbrun.homeip.net

  5. #5
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    I guess you downloaded this file to your windows box as I know Windows has issues with creating files that start with a period. You sure it's not a CR/LF issue in your .htaccess file?
    To err is human. To really foul things up ... you need a computer.

  6. #6
    Senior Member ajbrun's Avatar
    Join Date
    Apr 2004
    Location
    York, England
    Posts
    4,840
    Thanks
    4
    Thanked
    25 times in 13 posts
    To create the htaccess file, I went into notepad, save > all files > .htaccess

    Should I have done it another way?

    What's a CR/LF issue anyway?

  7. #7
    Ah, Mrs. Peel! mike_w's Avatar
    Join Date
    Oct 2003
    Location
    Hertfordshire, England
    Posts
    3,326
    Thanks
    3
    Thanked
    9 times in 7 posts
    Quote Originally Posted by ajbrun
    What's a CR/LF issue anyway?
    Carriage Return/Line Feed... I don't know much more than that, except that Linux and Windows use slightly different characters to indicate a new line.

    *nix systems just use LF, while DOS/Windows uses CR/LF.
    "Well, there was your Uncle Tiberius who died wrapped in cabbage leaves but we assumed that was a freak accident."

  8. #8
    Senior Member ajbrun's Avatar
    Join Date
    Apr 2004
    Location
    York, England
    Posts
    4,840
    Thanks
    4
    Thanked
    25 times in 13 posts
    I just noticed today that my website folder wasn't showing like it normally was. Seems my .htaccess file is now successfully blocking that folder. The problem now is not that it's not detecting .htaccess.

    The problem is getting it to do what I want .

    I want to start using server side includes (SSI). It says here that I need to put the following commands into a .htaccess file for it to work:

    Options +Includes
    AddType text/html .shtml
    AddHandler server-parsed .shtml

    I've put that into the file, but my .shtml file isn't working at all. It just says:

    [an error occurred while processing this directive]
    Anyone know how to make SSI work via a .htaccess file at all?

  9. #9
    Ah, Mrs. Peel! mike_w's Avatar
    Join Date
    Oct 2003
    Location
    Hertfordshire, England
    Posts
    3,326
    Thanks
    3
    Thanked
    9 times in 7 posts
    Have you installed Server Side Includes onto the Apache server itself?
    "Well, there was your Uncle Tiberius who died wrapped in cabbage leaves but we assumed that was a freak accident."

  10. #10
    Senior Member ajbrun's Avatar
    Join Date
    Apr 2004
    Location
    York, England
    Posts
    4,840
    Thanks
    4
    Thanked
    25 times in 13 posts
    I've not seen anything that says I need to install anything to make SSI work. I've just seen a few commands as shown above to 'activate' it.

  11. #11
    Ah, Mrs. Peel! mike_w's Avatar
    Join Date
    Oct 2003
    Location
    Hertfordshire, England
    Posts
    3,326
    Thanks
    3
    Thanked
    9 times in 7 posts
    To permit SSI on your server, you must have mod_include installed and enabled.
    http://httpd.apache.org/docs/1.3/how...vertopermitssi

    Lots of other stuff about server side includes in there as well.
    "Well, there was your Uncle Tiberius who died wrapped in cabbage leaves but we assumed that was a freak accident."

  12. #12
    Senior Member ajbrun's Avatar
    Join Date
    Apr 2004
    Location
    York, England
    Posts
    4,840
    Thanks
    4
    Thanked
    25 times in 13 posts
    Well, I'm pretty sure it's already installed and enabled.

    I have this file: C:\Program Files\Apache Group\Apache2\modules\mod_includes.so

    and this is uncommented in my httpd.conf: LoadModule include_module modules/mod_include.so

  13. #13
    Ah, Mrs. Peel! mike_w's Avatar
    Join Date
    Oct 2003
    Location
    Hertfordshire, England
    Posts
    3,326
    Thanks
    3
    Thanked
    9 times in 7 posts
    Perhaps try adding this line:

    AddOutputFilter INCLUDES .shtml

    along with wherever you put AddType text/html .shtml.
    "Well, there was your Uncle Tiberius who died wrapped in cabbage leaves but we assumed that was a freak accident."

  14. #14
    Senior Member ajbrun's Avatar
    Join Date
    Apr 2004
    Location
    York, England
    Posts
    4,840
    Thanks
    4
    Thanked
    25 times in 13 posts
    Nope - still the same error.

    Might just leave it, unless anyone has a better way of keeping a site constant using a template.
    Last edited by ajbrun; 22-02-2006 at 12:14 AM.

  15. #15
    Ah, Mrs. Peel! mike_w's Avatar
    Join Date
    Oct 2003
    Location
    Hertfordshire, England
    Posts
    3,326
    Thanks
    3
    Thanked
    9 times in 7 posts
    Quote Originally Posted by ajbrun
    Nope - still the same error.

    Might just leave it, unless anyone has a better way of keeping a site constant using a template.
    Use PHP?
    "Well, there was your Uncle Tiberius who died wrapped in cabbage leaves but we assumed that was a freak accident."

  16. #16
    Senior Member ajbrun's Avatar
    Join Date
    Apr 2004
    Location
    York, England
    Posts
    4,840
    Thanks
    4
    Thanked
    25 times in 13 posts
    I've found another way of doing it now. Thanks for the help anyway .

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Apache Web Server Search
    By Raz316 in forum Software
    Replies: 4
    Last Post: 22-01-2006, 04:03 PM
  2. BF2 patch tomorrow
    By Tobeman in forum Gaming
    Replies: 0
    Last Post: 04-10-2005, 04:43 PM
  3. Sharepoint
    By Vini in forum Software
    Replies: 9
    Last Post: 21-07-2005, 05:09 PM
  4. Apache HTTP Web server configuration...
    By joshwa in forum Software
    Replies: 2
    Last Post: 22-06-2005, 02:52 PM

Posting Permissions

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