Forum Moderators: phranque
I would like my site to look something like this:
free.example.com
sdsdsd.example.com
asdgasd.example.com
whatever is type in for the subdomain it always exist, rather than nothing.
My current .htaccess code is this:
# -FrontPage-
IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.blabla.com
AuthUserFile /home/vom/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/vom/public_html/_vti_pvt/service.grp
Please guide me for this one.. Any help will be greatly appreciate. Thanks in advance :)
Tandiono
[edited by: jdMorgan at 1:30 am (utc) on Oct. 2, 2005]
[edit reason] Example.com [/edit]
First, you set up your DNS to point all possible subdomains to your server. Then you must set up your server to recognize those subdomains, either as separate sites or as aliases for the main domain. Once the subdomains are resolved to a directory on your server, you can then add directives to rewrite or redirect requested URLs as you please.
Jim
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
I try to type an non exist subdomain but it fail, am I on the right track? Please advice me. Thanks :)
[edited by: jdMorgan at 3:37 am (utc) on Oct. 5, 2005]
[edit reason] Snipped URL per Terms of Service. [/edit]