Forum Moderators: phranque
I coded the mod_rewrite as follows:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.ccc\.net$
RewriteRule ^(.*)$ /ccc/$1 [C]
RewriteCond %(HTTP_HOST) ^www\.cc\.net$
RewriteRule ^(.*)$ /ccc/$1 [C]
RewriteCond %(HTTP_HOST) ^www\.ddd\.com$
RewriteRule ^(.*)$ /ddd/$1 [L]
What happens is that the first link works. www.ccc.net goes to the right directory and displays correctly. However none of the other portions seem to be executed. I tried adding the chain directive in at the end, but still nothing, so I figured I'd see if anyone could shed some light on the topic here.
Thanks,
George
But this would be impossible because the host doesn't change.
You are using parenthesis () instead of braces {} in two conditions.
May be this helps:
RewriteEngine On
# prevent looping in per-dir context
RewriteRule ^(ccc¦ddd)/ - [L]
RewriteCond %{HTTP_HOST} ^www\.(ccc¦cc)\.net
RewriteRule ^(.*)$ /ccc/$1 [L]
RewriteCond %{HTTP_HOST} ^www\.ddd\.com
RewriteRule ^(.*)$ /ddd/$1 [L] Change the ¦ into a 'logical or' from your keyboard; the character is changed by the forums software.