Jump to content

Help with <directory>


scrupul0us

Recommended Posts

I have a directory config'd as such:

 

<Directory /var/www/htdocs/~dev>

AuthName "Development Portal"

AuthType Basic

AuthUserFile /etc/apache/passwd/passwords

Require valid-user

Options Indexes Multiviews

</Directory>

 

now,

 

if i goto http://localhost/~dev i get a 301 error

 

if i goto http://localhost/~dev/ i get the auth prompt and am able to login

 

how can i configure my directory to treat them as "the same"... im using linux and apache 1.3.x

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/38234-help-with/
Share on other sites

well i actually found this:

 

Every webmaster can sing a song about the problem of the trailing slash on URLs referencing directories. If they are missing, the server dumps an error, because if you say /~quux/foo instead of /~quux/foo/ then the server searches for a file named foo. And because this file is a directory it complains....

 

So, to do this trick we write:

 

RewriteEngine  on

RewriteBase    /~quux/

RewriteCond    %{REQUEST_FILENAME}  -d

RewriteRule    ^(.+[^/])$          $1/  [R]

 

now my question is, what do i change the rewritebase to?

 

my files are served from /etc/www/htdocs/

Link to comment
https://forums.phpfreaks.com/topic/38234-help-with/#findComment-183690
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.