domains pointing to subdirs

Using a single web hosting account to host multiple sites

Postby Guest » Sun Dec 02, 2001 8:05 am


how can I realize the following with mod_rewrite:

if a requested url starts with and does not continue with A/ then rewrite to

for all requests?

e.g. gets gets

and so on.

Thanks in advance.

Greetings, Oliver

Postby Brett » Fri Dec 07, 2001 6:17 pm

Try something like the following:

RewriteEngine on
RewriteCond %{HTTP_HOST}
RewriteCond %{REQUEST_URI} !^/a/
RewriteRule ^(.*) a/$1 [L]

By the way, it seems that the easiest and most reliable way to avoid the possibility accidental infinite loops is to include, in your a/ directory, an .htaccess file containing RewriteEngine off.
Posts: 82
Joined: Tue Jul 10, 2001 4:00 pm

Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 8 guests