Forum Moderators: phranque

Message Too Old, No Replies

Subdomain

         

D3m3ntu187

7:50 am on Dec 9, 2006 (gmt 0)

10+ Year Member



I need some help. i bought a .ro domain and host for site and i got 20 subdomains. i made hub.domain.ro subdomain and i want to use it as an adress for a hub for DC++.
what i need to do to make it work. i just created the sub and set up the redirection to hub's ip but it aint working.

this is Apache version 1.3.37 (Unix) my host uses

MichaelBluejay

11:25 am on Dec 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi, and welcome to WebmasterWorld!

Help us out here -- how exactly did you set up the redirection -- .htaccess? What code did you use? Or did you set it up through your host's web-based control panel?

Also, could I ask you to title your posts with something more descriptive? (Like a whole sentence, not just a single word.) Thanks!

D3m3ntu187

1:27 pm on Dec 9, 2006 (gmt 0)

10+ Year Member



i set up thru the control panel
i tried with http://IP or just the IP but it didnt worked so i would like to know what do i need to modify in .htaccess to work.

this is the .htaccess

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.ro$
RewriteRule ^(.*)$ [111.222.333.444...] [R=301,L]

CPanel version : 10.9.0-RELEASE 95

[edited by: encyclo at 3:06 pm (utc) on Dec. 9, 2006]
[edit reason] obscured specifics, see TOS [webmasterworld.com] [/edit]

MichaelBluejay

4:09 am on Dec 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm not clear on exactly what you're trying to do. Are you trying to redirect requests for a subdomain to the main domain? Or vice versa? Or do you want to have one website at the main domain and another site at the subdomain?

If it's the last thing that you're trying to do, then this is probably a question for your host. Setting up a subdomain is generally not something you'd do on your own. Setting it to redirect somewhere is something you can handle, but not the subdomain setup itself.

I don't know what DC++ is, either.

D3m3ntu187

6:36 am on Dec 10, 2006 (gmt 0)

10+ Year Member



All i want to do is to redirect the sub on a certain ip that is not a site or sth like that.Lets sau i have a server, a game server on ip 23.54.87.98. i want to redirect the sub on that ip so, when i am connecting to sub.domain.ro to connect in fact to that ip. i repeat that ip its no site or sth like that, but a server. iwant it to work like a no-ip address.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^sub.domain.ro$
RewriteRule ^(.*)$ 23.54.87.98 [R=301,L]

sth like that my .htaccess look

[edited by: D3m3ntu187 at 6:38 am (utc) on Dec. 10, 2006]

MichaelBluejay

7:33 am on Dec 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



So when someone tries to connect to sub.domain.ro, you want to send them to 23.54.87.98? If 23.54.87.98 were a web server, then the only thing missing from your .htaccess code would be the "http://" which should go before the subdomain. But since you say 23.54.87.98 is a gaming server, I'm not sure what syntax to use.

Do you have access to your logs? You can make a request for sub.domain.ro, and then check your logs (usually access.log and error.log) to see what the server did (or didn't do) with the request.

D3m3ntu187

7:53 am on Dec 10, 2006 (gmt 0)

10+ Year Member



Nah. All i can see its the Error log in the Cpanel that is empty.

jdMorgan

2:52 pm on Dec 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A critical question is whether the subdomain is defined in the DNS record for the domain, and whether the host has 'defined' it inthe server config. Either may be done explicitly or through the use of "wild-card subdomains" in the DNS and server configuration.

If either of these steps have not been done, then these requests will never even resolve to your server.

Jim