[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Help with mod_rewrite

I've been attempting to set up a server for hosting personal web sites for
our clients. We have several domain names that we use and don't want
accounts to overlap between virtual hosts should we add commercial sites to
this server. The only thing that doesn't work is automatically adding a
trailing slash at the end of directory URL's. My original configuration for
the virtual hosts is shown below:

<VirtualHost members.domain.com>
  ServerName members.domain.com
  ServerAdmin webmaster@domain.com
  CustomLog /home/main/apache_logs/access.log combined
  ErrorLog /home/main/apache_logs/error.log
  DocumentRoot /home/main/public_html
  ScriptAlias /cgi-bin/ /home/main/apache_cgi-bin/
  AliasMatch /~(.*)/(.*) /home/domain/zt$1/public_html/$2

  <IfModule mod_throttle.c>
    ThrottlePolicy none

    <Location /throttle-me>
      SetHandler throttle-me

    <Location /~*/throttle-me>
      SetHandler throttle-me



I read the documents online for mod_rewrite and set up these directives in
the virtual host:

RewriteEngine on
RewriteRule ^(.+[^/])$ $1/

Unfortunately, I just got these errors showing it wasn't working as

[Tue Jan 14 11:49:34 2003] [error] [client] File does not exist:
[Tue Jan 14 11:50:15 2003] [error] [client] Directory index
forbidden by rule: /home/domain/ztbubba/public_html/
[Tue Jan 14 11:51:18 2003] [error] [client] File does not exist:

Are there any easy to understand HOWTO's for adding this feature?

Reply to: