How can I set up a 404 error page when people access http://ftp.mydomain.com?
Posted
by
Tim B.
on Server Fault
See other posts from Server Fault
or by Tim B.
Published on 2012-10-01T14:34:42Z
Indexed on
2012/10/02
3:41 UTC
Read the original article
Hit count: 546
I am a freelance videographer/developer, and part of my job involves transferring large files over FTP to production houses/television stations. While the majority of people in my industry understand the difference between FTP and HTTP, I've experienced several interactions in the past couple months of people who still open Internet Explorer and try to access http://ftp.mydomain.com, receive an error page served by HostGator, and tell me that they cannot access my FTP server.
Instead of spending time delivering instructions via e-mail, I'd much prefer to serve up a custom error page in this instance that instructs them how to download and use an FTP client.
I tried setting up a sub-domain in Cpanel hoping I could simply drop in an .htaccess file with the error page, but I got this error:
ftp.mydomain.com domainadmin-domainexistsglobal
I also tried creating a custom error page in PHP which reads the site URL and serves up the custom content only when http://ftp.mydomain.com is accessed. Unfortunately, the error page works for every subdomain except that one.
I'm not entirely sure this is even technically possible, which is why I bring it to the good people of StackOverflow to help. Thanks!
© Server Fault or respective owner