View Full Version : Forword to an ip instead of a web page
penth
03-14-2006, 08:16 AM
for 1and 1 domain is there a way to forward the subdomain to an external ip like the yahoo server does by editing it's a-record? like apointing an destination and a sourse for example if i wish to apoint server1.myweb.com port 1000 because the port isn't 80 so even by using the php or http worford method it won't work. but if there is a way to directly forward a domain/subdmain directed to an external ip? thanks in advance.
eWebtricity
03-14-2006, 11:55 PM
Are you using the 1and1 DNS control panel for managing your domains? If so I don't think it can be done, which is one of the reasons we lost interest in using them for domain name management/registration.
penth
03-15-2006, 01:52 AM
:( but isn't there any possible script that can be placed, in order to accomplishing this? such as the header function of php that forwards to a dir but http, ftp or such must be placed or else it will become an "child url" that pasted after the current location where the file is placed. wat if i wish to forward to 100 instead of 80 or 21?
Highland
03-15-2006, 10:20 AM
I don't see any reason why using the header function wouldn't work
header("HTTP/1.1 301 Moved Permanently");
header("Location:http://www.domain.com:100");
penth
03-15-2006, 01:22 PM
because the port 100 isn't http and it's some kind of customed servers such as voice server game server or that it had to be connected using specific application.
Highland
03-15-2006, 05:40 PM
Well you could manually add your httpd.conf for that domain and tell Apache to listen on port 100. As to my code, that :100 tells your browser to contact port 100
penth
03-16-2006, 09:39 AM
but I am not going to use a browser, it's a program such as the aim icq or msn messenger that we'r all using to connect, will that work?
Highland
03-16-2006, 10:25 AM
You're going to have to be more specific as to what you're doing. I can't think of any reason why an IM program would need to connect to a web server.
penth
03-22-2006, 01:58 AM
it's not connecting to a web server. it's like this, domain.com is a 1and1 domain and are used as any regular domain, but I wish to develop my own software wich works simular way as aim or a teamspeak/ventrilo server that connects to a separate server, it can be a dedicated test server at my home. so i'll do mysoftarehost.domain.com:100 to point to my own server wich are a server side of this software,(it really don't matter wat it is, it can be a web based game that i've developed) so that the client can use this mysoftarehost.domain.com:100 go point to my ip:100 instead of a need to type in the ip. just to hide the ip and to be easier to remember for the client.
eWebtricity
03-22-2006, 10:19 AM
A meta refresh tag would also forward the request to anywhere you want
skunkboy
03-24-2006, 10:11 PM
You could possibly use the following; in variation for what you're trying to do.
In short, the following code with check for a file between two locations. If it doesn't exist at the first location, it will try the second before prompting a 404. I used to use this back with my old host. I pushed past their 5gb of space and, well, ended up hosting some of the site on my own server at home till I ended up moving to a dedicated box with 1and1.
# This first rule finishes redirect process right away for file types not concerned.
Rewriterule !^.*\.(html?|jpg)$ - [L]
# 2nd rule finishes redirect process right away for existing files.
RewriteCond /primary/htdocs%{REQUEST_URI} -f
Rewriterule ^.*\.(jpg)$ - [L]
# Among the files not on the server, send .jpg to other server
RewriteCond /primary/htdocs/%{REQUEST_URI} \.jpg$
RewriteRule ^(.+\.jpg)$ http://secondary.net/$1 [L]
vBulletin® v3.7.0 Beta 4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.