Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache .htaccess Files Not Working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ShadowMetis
Apprentice
Apprentice


Joined: 03 Feb 2005
Posts: 181
Location: Newburgh, NY

PostPosted: Sat Mar 04, 2006 9:29 pm    Post subject: Apache .htaccess Files Not Working Reply with quote

I'm trying to make a certain directory where .phps files will be served as PHP files, however the .htaccess file isn't working. I have the AllowOverride directive properly set for the directory in which I'm trying to work with, however it's still not working.

Code:

httpd.conf:

<Directory "/home/htdocs">
      Options FollowSymlinks
      AllowOverride All
      Order allow,deny
      Allow from all
</Directory>
<Directory "/home/htdocs/images2">
      Options FollowSymlinks
      AllowOverride All
      Order allow,deny
      Allow from all
</Directory>


/home/htdocs/images2/.htaccess:

SetHandler application/x-httpd-php
[/code]
Back to top
View user's profile Send private message
s0be
Apprentice
Apprentice


Joined: 23 Nov 2002
Posts: 240

PostPosted: Sat Mar 04, 2006 10:11 pm    Post subject: Reply with quote

Try wrapping your sethandler directive in a location or directory section.

Code:

<Location path >
  SetHandler ....
</Location>


edit: aha, found where i used it locally:
Code:

<Location .>
SetHandler application/x-httpd-php
</Location>
Back to top
View user's profile Send private message
ShadowMetis
Apprentice
Apprentice


Joined: 03 Feb 2005
Posts: 181
Location: Newburgh, NY

PostPosted: Sat Mar 04, 2006 10:52 pm    Post subject: Reply with quote

Like this?
Code:

<Location "/images2">
      SetHandler application/x-httpd-php
</Location>
Back to top
View user's profile Send private message
s0be
Apprentice
Apprentice


Joined: 23 Nov 2002
Posts: 240

PostPosted: Sun Mar 05, 2006 2:38 am    Post subject: Reply with quote

ShadowMetis wrote:
Like this?
Code:

<Location "/images2">
      SetHandler application/x-httpd-php
</Location>


I don't think you need the quotes.

If you need to use a path with spaces in it, just escape them.

Code:
<Location /windows/Program\ Files>
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum