Thread: .htaccess
View Single Post
  #1  
Old 16th June 2007, 00:15
Liac Liac is offline
Junior Member
 
Join Date: Jun 2007
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Question .htaccess

Hello all.

First of all, I hope this is the right forum. Like the title suggests, this thread is all about .htaccess and the headache it causes for me.

To put it simply: it doesn't work. I have spent almost 2 hours trying to figure out why, googled trying to find a solution, but to no avail.

Here's my simple .htaccess:
Code:
ErrorDocument 404 custom404.php
My server is running on a local machine. I'm using Ubuntu Linux Server 7.04 with auto-configured Apache, PHP and MySQL. I must say, this is my first try with Linux ever (!), so if you give a Linux-specific answer, I'd appreciate if you explain it for a newbie .

In /etc/apache2/ I have created a link in "mods-enabled" to rewrite.load in "mods-available". I hope that this has loaded the module (and it apparently has since loading it again with "LoadModule rewrite_module modules/mod_rewrite.so" in apache2.conf issues a warning, that it has already been loaded).

In my apache2.conf, there are also these lines:
Code:
AccessFileName .htaccess
(And at the end...):
Code:
<directory />
AllowOverride All
Options All
</directory>
When I specify the contents of the .htaccess file ("ErrorDocument 404 custom404.php") directly in apache2.conf, it works perfectly. So I guess I have configured something wrong, so that .htaccess files are just ignored.

So, how to make .htaccess files work?

Any help would be really appreciated

Thanks in advance,
Liac
Reply With Quote
Sponsored Links