Hello there to all, here is what i am trying to achieve:
-i need an apache configuration rule that will allow me to have
unlimited subdomains under a given domain, but i need this to be one
general configuration so i don't have to set all subdomains, my quess
is something related to VirtualHost!
-example will be something like this: when i type
42490853405.domain.com it will redirect(by using mod re-write) me to
a certain file(or folrder) on the domain.com where i will take the
subdomain name and with that i will make a certain query!
I have tried this config but no luck, maybe you can find the problem:
<VirtualHost *>
ServerName domain.net
ServerAlias
www.domain.net *.domain.net
# et cetera
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?([^.]+)\.domain\.net$ [NC]
RewriteCond %2 !^www$ [NC]
RewriteRule ^.*$ /%2%{REQUEST_URI} [L]
</VirtualHost>
Thank you in advance for taking your time to read this post,
Regards,ovidiu
-----------------------------------
http://www.DevPlug.com -- Connecting Developers