You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Florian Effenberger <fl...@arcor.de> on 2003/11/26 19:46:30 UTC

[users@httpd] mod_rewrite and error pages

(Received an error message on my last mailing to the German list, so I try
it again in here.)

Hi there,

I hope my question has not been asked a hundred times before.

I use Apache with suEXEC, which has been working fine for the last couple of
months. Some users have the privilege to publish their own sub-sites. These
sites do use suEXEC as well. Normally, they had to be opened via "~user",
but in order to make them available with other paths, I have created the
following rule in several VHosts:

RewriteRule ^/sub-site$ /sub-site/ [R]
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^/sub-site/(.*) http://www.virtual.domain/~users/$1 [P]

I.e. the user "user" can upload his page separately, while it still uses
suEXEC and is available via "/sub-site".

1.) I'm not good at doing mod_rewrite, so I think the above could be written
in a more easy way. Any ideas? ;-)

2.) The only crook is, that on error sites or directory listings I now - of
course - see "Index of ~user" or "Could not find ~user/non.existant.html".
What could I do to replace ~user with sub-site in here, when I want to use
suEXEC?

Thanks a lot!
Florian


---------------------------------------------------------------------
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