Forum Moderators: phranque
and i wanna make it look like this
firstname-lastname.mydomain.com
user-master.mydomain.com
user-clovn.mydomain.com
i've create a 'wild-card' dns record to point all subdomains on my server usign this steps:
"Make sure you have a wildcard DNS entry in Domain > DNS. You can add one as followed:
Set the "Record Type" dropdown to "A" and click the Add button.
In the next screen enter a * (asteriks) in the domain name field, and enter the IP address your subdomain needs to point to."
what should i do next?
if i have the directory sub1 i can accesing by sub1.example.com without problem but i have like 500 directories. should write RewriteRule for all the directories or is a expresion for that?
tnx allot
but still is a small problem. the directory sub1 it can be access it by sub1.example.com only by sub1.example.com/sub1 any help is welcome . tnx allot
Can you re-phrase that question? It is not clear.
I'd suggest the following modifications to make the rule more robust:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
RewriteCond %{HTTP_HOST} ^([a-z0-9_]+)\.example\.com
RewriteRule ^/(.*) /%1/$1 [L]
Jim