I am using Catch-all-style for my domain by setting wildcard serveralias.
Now http://subdoman.domain.com mapping http://doman.com?user.php?login=subdomain.
I have created the Rules for this. these are following and working fine.
- Code: Select all
RewriteCond %{HTTP_HOST} ^([^.]+)\.domain\.com$ [NC]
RewriteCond %1 !^(www|ftp|mail)$ [NC]
RewriteRule ^.?$ user.php?login=%1 [L]
Now the problem is if sometype enter the url like http://subdomain.domain.com/(anything after that) will map to Error page
I have tried lots of thing(example below) but its not working
- Code: Select all
RewriteCond %{HTTP_HOST} ^([^.]+)\.domain\.com/[.*/] [NC]
RewriteCond %1 !^(www|ftp|mail)$ [NC]
RewriteRule ^.?$ 404.php [L]
Please Help
Thanks
Ashish