Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.

Multiple mod_rewrite directives

Skip to first unread message

Marious Barrier

Jun 4, 2010, 3:05:53 PM6/4/10
Hello, my issue is as follows.-

I want to dinamically access to directories in /opt/www/work/n where n
is the subdomain I will ask for in my address bar: → /opt/www/work/project1/

I managed to make it work with with the following rewrite directives in
my vhost file:

RewriteCond %{HTTP_HOST} ^([^.]+)\.work$
RewriteRule ^/(.*)$ /opt/www/work/%1/$1 [L]

All worked nicely until I tried to host there a project in which I used
an htaccess file to redirect everything to a single file.
the rule of this file is:

RewriteRule ^ main.php [L]

It works well when not hosted in my “dinamic” vhost.

Any help to fix this issue will be appreciated.

0 new messages