My application dynamically creates sub domains.
If just the subdomain is used (no other path): mydomain.mysite.com
I need the subdomain to remap/rewrite (keep the same URL so its hidden from the user) to the following url mydomain.mysite.com/event/mydomain
In the instance where there are other parameters passed then I want to ignore the rewrite rule. (mydomain.mysite.com/something/else
)
I'm having trouble with the following endind up in a redirect loop
RewriteEngine on RewriteCond %{HTTP_HOST} ^(.*)\.mysite\.com
RewriteRule ^(.*)$ http:// %1.mysite.com/events/%1 [L,NC,QSA]
Its also rewriting when I pass other params!