SubDomain to CS server IP

Using a single web hosting account to host multiple sites

SubDomain to CS server IP

Postby leite » Sat Jan 19, 2008 10:02 am

How to redirect subdomain (for example: cs.site.com) to Counter Strike Server Ip (for example: 111.111.111.111:27015)
leite
 
Posts: 4
Joined: Fri Dec 28, 2007 1:33 am

Postby richardk » Sat Jan 19, 2008 4:47 pm

Mod_rewrite can't help here. Your Counter Strike client will almost certainly not be using the HTTP protocol and therefore will not be able to communicate with Apache and mod_rewrite won't be able to run.

Go to your domain control panel. Create the sub domain and set it to go to the IP of the server. You cannot hide the port.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby leite » Mon Jan 21, 2008 9:36 am

Yes I made subdomain and redirect it to my ip.

Here is the .htaccess code:



RewriteEngine on
RewriteCond %{HTTP_HOST} ^cs.site.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.cs.site.com$
RewriteRule ^(.*)$ 111.111.111.111 [R=301,L]
leite
 
Posts: 4
Joined: Fri Dec 28, 2007 1:33 am

Postby richardk » Mon Jan 21, 2008 10:28 am

And that works with CS?

Then you can use
Code: Select all
Options +FollowSymLinks

RewriteEngine on

RewriteCond %{HTTP_HOST} ^(www\.)?cs\.site\.com$ [NC]
RewriteRule ^(.*)$ http://1.2.3.4:56789 [R=301,L]

and hide the port too.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 17 guests

cron