LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-28-2005, 11:37 PM   #1
belorion
Member
 
Registered: Aug 2003
Distribution: Slackware 10.0
Posts: 124

Rep: Reputation: 16
Strange htaccess problem (it ignored!)


I have 2 vhosts on my Apache 2.0.51 (On RH Fedora 2) server.

I'm trying to get mod_rewrites to work in my second host. I have an .htaccess file in my public/ directory. Here is the relevant portion of my httpd.conf:

<VirtualHost *:80>
ServerName www.example.com
DocumentRoot /var/www/applications/myapp/public/

<Directory "/var/www/applciations/myapp/public/">
AllowOverride All
</Directory>
</VirtualHost>

So, I can browse to this site just fine. But it behaves as if the .htaccess file is *completely* ignored. All of my rules in .htaccess are just never used.

If I paste in the content of my .htaccess file and put them within the virtualhost directive above, everything works fine. But if i take it out and rely on the .htaccess file... it just doesn't work. The .htaccess file is completely ignored.

Any idea why this is and how I can fix it?
 
Old 03-01-2005, 02:59 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Does it work if you specify it in the Directory directive?

Did you build apache with rewrite support?

Perhaps you could post a copy of your .htaccess file.
 
Old 03-01-2005, 03:32 PM   #3
belorion
Member
 
Registered: Aug 2003
Distribution: Slackware 10.0
Posts: 124

Original Poster
Rep: Reputation: 16
Thank you for the reply. I've got the problem fixed -- though I don't know how.

Basically, I said to myself "well, rewriting isn't happening using AllowOverride All for /var/www/applications/myapp/public, what if I set AllowOverride All for / ?" I know that that would turn on Overrides for *everything*, but I wanted to see if it would work.

It did.

So then I did it for /var/. That worked. Then /var/www/, etc. By the time I got back up to /var/www/applications/myapp/public, it was still working.

I know my spelling for the path was correct. I compared the two ... they were identicle. I have no idea why it started working when I did that, but it did.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess problem lothario Linux - Software 0 01-22-2005 06:20 AM
strange, strange alsa problem: sound is grainy/pixellated? fenderman11111 Linux - Software 1 11-01-2004 06:16 PM
strange apache errors - no htaccess... keex Linux - Networking 1 01-13-2004 01:38 PM
.htaccess problem Ramon_E Linux - Security 3 10-20-2003 08:32 PM
.htaccess problem mwmethe Linux - Security 1 08-31-2002 01:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration