View Full Version : redirect to ftp
robbyvw
02-22-2004, 04:05 AM
hello,
i have a ftp server on my computer and i want that a subdomain redirect to my ftp.
so when i type http://sub.domain.com, i want to go to ftp://ip:port
how can i do that in direct admin?
please advise!
thanx
Robby
DirectAdmin Support
02-22-2004, 11:45 PM
Hello,
Create an index.php file in domain.com/public_html/sub/index.php with:
<? header("Location: ftp://1.2.3.4:21"); ?>
John
robbyvw
02-23-2004, 06:42 AM
correct but for a ftp server i have to redirect to a port number to, how do i do that??
thanx!
greetz robby
DirectAdmin Support
02-23-2004, 10:36 AM
<? header("Location: ftp://1.2.3.4:21"); ?>It's there. Port 21.
John
robbyvw
02-23-2004, 11:11 AM
it won't work! i already tried but this code redirect not to an ftp site. i work fine if it redirect to http but nog to ftp... :(
somebody who knows?
gr robby
existenz
02-23-2004, 07:02 PM
Originally posted by robbyvw
hello,
i have a ftp server on my computer and i want that a subdomain redirect to my ftp.
so when i type http://sub.domain.com, i want to go to ftp://ip:port
how can i do that in direct admin?
please advise!
thanx
Robby
I honestly dont' think that is possible with the current system. You can redirect to a port. The best you can do is if people are doing this from web to ftp is:
<meta http-equiv="refresh" content="0;url=ftp://ftp.domain.tdl:1">
At this point you coud have used John's php code. I don't think their is a easy solution for you. You could do port fowarding but that is done at the router. I assume the ftp server has sometype of DHCP connection to the internet.
It IS possible and we have used in different way but it possible to set up a VPN at your colo and at the ftp server and you can give the ftp server a static ip through the VPN.
robbyvw
02-24-2004, 11:08 AM
this finally works!
but... it look like this:
http://bestanden.vwijngaarden.com/upload/naamloos2.jpg
if i click on an map en the map is opend it than look like it should be!
how is this possible, but much important, how can i solve this?
thanx !!
gr robby
existenz
02-24-2004, 12:59 PM
Not sure what the problem is. Is it working?
robbyvw
02-24-2004, 03:40 PM
yes it work, but the graphics are not as the should be..
is there something i can do about it?
gr robby
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.