Is there - and if yes, what is it - a solution to the following task:

I want to redirect browser requests targeting ftp://www.example.net to http://www.example.com

I am aware that ftp:// is communicating at port 21 while HTTP is using 80. Infrastructure is an Ubuntu Server with Apache.

Background: a FTP service that was mostly used through by visitors through a web browser is being canceled and an information page should be shown instead.

1 Answer 1


Redirection in HTTP is done at the HTTP protocol level. FTP has no such concept which means redirection at the protocol level is not possible. You might try to offer a HTML page using FTP which contains the refresh to another page, e.g.

<meta http-equiv="refresh" content="0; url=http://example.com/" />

Of course this requires the user to access this HTML page which means that the FTP server must be kept active. But this would be a requirement for HTTP redirects too, i.e. you need something at the original location which tells the user to look elsewhere.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.