scrupul0us Posted February 12, 2007 Share Posted February 12, 2007 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 Quote Link to comment Share on other sites More sharing options...
steviewdr Posted February 13, 2007 Share Posted February 13, 2007 Would this make a difference: <Directory /var/www/htdocs/~dev/> -steve Quote Link to comment Share on other sites More sharing options...
scrupul0us Posted February 13, 2007 Author Share Posted February 13, 2007 i tried and no Quote Link to comment Share on other sites More sharing options...
steviewdr Posted February 13, 2007 Share Posted February 13, 2007 I think you need to disable mod_userdir. www.website.com/~user is typically for users home directories. This may be affecting what you are trying to do. -steve Quote Link to comment Share on other sites More sharing options...
scrupul0us Posted February 13, 2007 Author Share Posted February 13, 2007 disabled the module and restarted apache... im still getting the error is there maybe a mod_rewrite rule i can use globally on the server to do this? Quote Link to comment Share on other sites More sharing options...
scrupul0us Posted February 13, 2007 Author Share Posted February 13, 2007 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/ Quote Link to comment Share on other sites More sharing options...
scrupul0us Posted February 13, 2007 Author Share Posted February 13, 2007 im gunna ask in the rewrite section... thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.