Multiple problems with .htaccess and httpd.conf.

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
The Bat
Forum Newbie
Posts: 14
Joined: Thu Feb 01, 2007 3:57 pm

Multiple problems with .htaccess and httpd.conf.

Post 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!
User avatar
seodevhead
Forum Regular
Posts: 705
Joined: Sat Oct 08, 2005 8:18 pm
Location: Windermere, FL

Post 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?
The Bat
Forum Newbie
Posts: 14
Joined: Thu Feb 01, 2007 3:57 pm

Post by The Bat »

Thanks for the help, seodevhead. However that did not fix anything. :(
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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.
The Bat
Forum Newbie
Posts: 14
Joined: Thu Feb 01, 2007 3:57 pm

Post 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?
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post 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>
The Bat
Forum Newbie
Posts: 14
Joined: Thu Feb 01, 2007 3:57 pm

Post 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!
Post Reply