Forum Moderators: phranque

Message Too Old, No Replies

non subdomain

subdomain

         

tandiono

8:17 pm on Sep 30, 2005 (gmt 0)



Hi! Is there a way to create a non exist subdomain* and redirect it to some site?

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]

tandiono

1:05 am on Oct 3, 2005 (gmt 0)



bump.. Anyone pleasee please help me :(

WyriHaximus

9:12 am on Oct 3, 2005 (gmt 0)

10+ Year Member



I love to see a solution for this to :).

jdMorgan

4:19 am on Oct 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I believe you may be asking about Wild-Card DNS [google.com].

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

tandiono

2:55 am on Oct 5, 2005 (gmt 0)



Hi Jim! Thanks for replying :) I've set my DNS by adding *.example.com on my dns setting. this is how my setting look like. and also i've try to modify my .htaccess by replacing with this code

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]

jdMorgan

3:38 am on Oct 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You missed a step:

Then you must set up your server to recognize those subdomains, either as separate sites or as aliases for the main domain.

You'll need to add a ServerAlias directive to httpd.conf.

Also, be aware that DNS changes can take 48 hours to propagate fully.

Jim

tandiono

3:17 pm on Oct 7, 2005 (gmt 0)



Hi! Im having problem with the adding a ServerAlias directive to httpd.conf. Is there a way to access it from cpanel? Do i just create the file name htppd.conf and then just upload it onto ftp directory?

tandiono

9:58 am on Oct 9, 2005 (gmt 0)



bump.. anyone please help me :)