Page 1 of 1

Multiple problems with .htaccess and httpd.conf.

Posted: Wed Feb 28, 2007 1:32 am
by The Bat
Hello, I am having serious trouble finding this out. I'm having problems with .htaccess files and my httpd.conf.

My first problem is, none of my .htaccess files work, even though I have 'AllowOverride All' in my httpd.conf file to allow .htaccess files. I have researched all over the internet, done everything they say to do, and nothing has worked. How could I possibly fix this?

My second problem is, no matter what I add in the mod_rewrite section of the httpd.conf file, it does not work! I've restarted Apache, cleared my browser's cache, and so on, and I know that the mod_rewrite modules are loaded. Why are the changes not having any affects?

What I have under mod_rewrite now is the default thing when I installed Apache. If it helps any, you can browse my httpd.conf file at http://yekita.net/httpd.conf.txt .

Thank you so much to those who help!

Posted: Wed Feb 28, 2007 5:13 pm
by seodevhead
You have:

Code: Select all

#
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
    Options Indexes FollowSymLinks MultiViews
When it should be:

Code: Select all

#
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
    Options All
Try it out, it should work lessen you have other problems in there I didn't catch.

feyd & others... am I right on this?

Posted: Wed Feb 28, 2007 6:57 pm
by The Bat
Thanks for the help, seodevhead. However that did not fix anything. :(

Posted: Thu Mar 01, 2007 12:44 am
by Chris Corbyn
I've had this problem before. It was never sorted until I upgraded apache. I don't know if it was a bug or if it was just me missing something in the config but I spent days on and off trying to fix it.

Posted: Fri Mar 09, 2007 12:58 am
by The Bat
d11wtq wrote:I've had this problem before. It was never sorted until I upgraded apache. I don't know if it was a bug or if it was just me missing something in the config but I spent days on and off trying to fix it.
Well, that's good news (about fixing the problem, of course). I'm using the Apache version that came with my Mac, so I'm not entirely sure on how to determine the current version. How do I do this?

Posted: Fri Mar 09, 2007 1:24 am
by nickvd
Where is your document root?

/Users/andrew/Sites?

if so try changing:

Code: Select all

<VirtualHost 127.0.0.1>
ServerName 127.0.0.1
DocumentRoot "/Users/andrew/Sites/"
</VirtualHost>
into

Code: Select all

<VirtualHost 127.0.0.1>
  ServerName 127.0.0.1
  DocumentRoot "/Users/andrew/Sites/"
  <Directory /Users/andrew/Sites/>
    AllowOverride All
  </Directory>
</VirtualHost>

Posted: Sun May 27, 2007 3:13 pm
by The Bat
EDIT: Following nickvd's solution, I was able to add 'DocumentError 404 /urlhere.php' to the .htaccess file in the Sites folder with it working correctly, but if I replace the DocumentError line with a rewrite rule, 127.0.0.1 says permission denied when I navigate to it. Why is this?

Wow, I'm sorry I didn't check on this thread until now. Nickvd, your solution worked. Thank you so much!