httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] Very Puzzling Question About mod_rewrite
Date Fri, 02 Nov 2007 00:24:32 GMT
On Nov 1, 2007 8:13 PM, Jon Forrest <jlforrest@berkeley.edu> wrote:
> (This is on Solaris 10-x86 with Apache 2.2.4)
>
> When I give the URL
>
> 1)  http://www-demo.cchem.berkeley.edu/username/public_html
>
> everything works fine. However, for historical reasons,
> I can't require that people give the "/public_html" at
> the end of the URL. In other words, I want users to
> be able to enter
>
> 2) http://www-demo.cchem.berkeley.edu/username/
>
> to see the same results as produced by URL #1 .
> So, I decided to try mod_rewrite. I use the following
> in the proper VirtualHost section of my httpd.conf file:
>
> RewriteLogLevel 5
> RewriteLog "/users/chemweb/apache2/logs/rewrite.log"
> RewriteEngine on
> RewriteRule  ^(.+)$  $1/public_html/      [L]
>
> This doesn't work. The client sees a "403 Forbidden" message.
> The apache log says:
>
> "Directory index forbidden by Options directive:
> /users/chemweb/apache2/http-cchem/htdocs/username/public_html/"
>
> I don't understand why I'm getting this message when
> URL #1 above works.

Likely because your Options directive is applied by-url rather than
by-directory.

You need
<Directory /full/path/to/userdirectories/*/public_html>
Options +Indexes
</Dirctory>

Or you need to find the Options directive that currently applies to
those directories and add Indexes.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message