View previous topic :: View next topic |
Author |
Message |
jtmace Tux's lil' helper
Joined: 20 Jun 2002 Posts: 101
|
Posted: Thu Mar 23, 2006 5:22 am Post subject: SOLVED! - My .htaccess isnt working?! |
|
|
I use the exact same .htaccess on a netbsd box and it works like a champ, but on my gentoo box it isnt doing anything. I run Apache2 and I'm just doing 1 simple redirect and directory protection..
Is there anything that Apache2 maybe had to be emerged with in the USE flag catagory or a module that needs to be loaded or something. I highly doubted it, but I've TRIED EVERYTHING and RTFM.
Last edited by jtmace on Fri Mar 31, 2006 9:30 pm; edited 1 time in total |
|
Back to top |
|
|
quantum0726 n00b
Joined: 25 Mar 2005 Posts: 26 Location: Milwaukee, WI
|
Posted: Thu Mar 23, 2006 6:34 am Post subject: |
|
|
Check all the <Directory /path> declarations in your httpd.conf and if you us vhosts, your default vhost conf file as well. I can't remember if I had to change it when I first set up Apache2, but AllowOverride needs to be set to allow the .htaccess file to override the settings of that directory. I believe that in Gentoo it defaults to 'AllowOverride None'. _________________ --Jayson
When Microsoft asks you, "Where do you want to go today?", tell them "*nix!" |
|
Back to top |
|
|
PMcCauley Apprentice
Joined: 14 Mar 2006 Posts: 283 Location: Alberta, Canada
|
Posted: Thu Mar 23, 2006 6:41 am Post subject: |
|
|
Using the exact same http.conf should work assuming this line is in Code: | AccessFileName .htaccess | this line could be in another file maybe a vhost or something. Try Code: | cat /etc/apache2/httpd.conf | grep .htaccess | to ensure you have the correct line. As quantum0726 mentioned it is also possible you may have a conflicting line in one of the other apache configuration files. You could add the accessfilename to a vhost as well.
Patrick |
|
Back to top |
|
|
jtmace Tux's lil' helper
Joined: 20 Jun 2002 Posts: 101
|
Posted: Mon Mar 27, 2006 5:36 am Post subject: |
|
|
PMcCauley wrote: | Using the exact same http.conf should work assuming this line is in Code: | AccessFileName .htaccess | this line could be in another file maybe a vhost or something. Try Code: | cat /etc/apache2/httpd.conf | grep .htaccess | to ensure you have the correct line. As quantum0726 mentioned it is also possible you may have a conflicting line in one of the other apache configuration files. You could add the accessfilename to a vhost as well.
Patrick |
That line is in my .htaccess. I'll continue to hunt I guess. |
|
Back to top |
|
|
jiri.tyr n00b
Joined: 08 Feb 2005 Posts: 26 Location: Czech Republic
|
Posted: Thu Mar 30, 2006 3:13 pm Post subject: |
|
|
That line is in my .htaccess. I'll continue to hunt I guess.[/quote]
Change in /etc/apache2/vhosts.d/00_default_vhost.conf this line:
AllowOverride None
to this:
AllowOverride All
After restart of the Apache it will be working. |
|
Back to top |
|
|
djcronos n00b
Joined: 02 Oct 2004 Posts: 53 Location: San Jose, CA
|
Posted: Fri Mar 31, 2006 12:29 am Post subject: |
|
|
Yep, this worked. For the person who submitted this topic, please post SOLVED in the subject so others can use this in case they have the same problem you did.
I can verify that I had this problem, and this is what immediately fixed it. _________________ Linux Lover #370481
Get Counted! |
|
Back to top |
|
|
jtmace Tux's lil' helper
Joined: 20 Jun 2002 Posts: 101
|
Posted: Fri Mar 31, 2006 9:30 pm Post subject: Thanks!! |
|
|
w00h00!!! You fixed it jiri.tyr!! Thanks alot.
Man I liked my config alot better when there werent vhosts. |
|
Back to top |
|
|
|