Hello,
On my website I uses virtual subdomains.
In my .htaccess I have the following rules:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.site\.com?$
RewriteCond %{HTTP_HOST} ^([^.]+)\.site\.com?$
RewriteRule ^$ /subdomain.php?subdomain=%1 [L]
It should works like this:
http: // subdomain.site.com display the content of subdomain.php
This is OK!
http:// WWW .subdomain.site.com/ display the content of the http:// www .site.com WHICH is wrong. I want all www. subdomain.site.com be redirected to www. site.com
If I type http :// subdomain.site.com/category/name_of_category I am redirected to http: // WWW .subdomain.site.com/category/name_of_category and it is diaplyed the content of http: // www. site.com/category/name_of_category
Instead of that I need a 404 error response.
How can I resolve this problem ?
Thank you very much!