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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.