473,395 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

html to ftp redirection not working

Hi there,
I am using a perl script to generate this html page which just
redirects users to my ftp server. The problem is I get a "page cannot
be displayed" in IE 6.0 (haven't tried other browsers) when the
redirection happens. But the redirection happens to the correct ftp
location and on pressing "Refresh" the FTP login dialog bar appears
and everything is fine.

Here is the HTML in question.

<HTML>
<HEAD>
<META http-equiv='REFRESH' content = '3; URL =
ftp://192.168.0.11'>
<TITLE>FTP Data</TITLE>
</HEAD>
<BODY>
<p>You are being redirected to ftp://192.168.0.11 in 3 seconds</p>
</BODY>
</HTML>

and the perl file that generates the html is

#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "<HTML><HEAD>";
print "<META http-equiv='REFRESH' content = '3; URL =
ftp://$ENV{'HTTP_HOST'}'>";
print "<TITLE>FTP Data</TITLE>";
print "</HEAD><BODY>";
print "<p>";
print "You are being redirected to ftp://$ENV{'HTTP_HOST'} in 3
seconds";
print "</p>";
print "</BODY></HTML>"

Can anyone tell me how to deal with this glitch? Thanks in advance.
-Manu
Jul 20 '05 #1
8 5970
Manu wrote:
Hi there,
I am using a perl script to generate this html page which just
redirects users to my ftp server. The problem is I get a "page cannot
be displayed" in IE 6.0 (haven't tried other browsers) when the
redirection happens. But the redirection happens to the correct ftp
location and on pressing "Refresh" the FTP login dialog bar appears
and everything is fine.

Here is the HTML in question.

<HTML>
<HEAD>
<META http-equiv='REFRESH' content = '3; URL =
ftp://192.168.0.11'> [...] Can anyone tell me how to deal with this glitch? Thanks in advance.


Yes, rewrite the Perl script that instead issues a real HTTP redirect
instead of quasi-standard <meta http-equiv> junk. IE, as well as real Web
browsers, should handle this much better.

--
Shawn K. Quinn
Jul 20 '05 #2
Manu wrote:
this html page which just redirects users to my ftp server.
Why don't you just provide a link to the ftp server? Are users incapable
of following a link?
The problem is I get a "page cannot be displayed" in IE 6.0 (haven't
tried other browsers) when the redirection happens. But the
redirection happens to the correct ftp location and on pressing
"Refresh" the FTP login dialog bar appears and everything is fine.
IE/Win issues one set of accept headers when it tries a new url. But it
issues different accept headers when reloading (or "refreshing") the
url. It's very strange behavior. You can, apparently, edit what accept
headers IE sends by editing the Windows registry. I've never been brave
enough to try that, perhaps because I've been frightened away by warning
messages.
<META http-equiv='REFRESH' content = '3; URL = ftp://192.168.0.11'>


Non-standard.

It seems to me that, if the page is merely an intermediary step to the
content, then a server redirect with proper response code, is
appropriate. But if you don't want to send www ua's to an ftp server
without the user's explicit knowledge -- that would be best in my view
-- then a simple link would be best.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #3
Shawn K. Quinn wrote:
Manu wrote:
I get a "page cannot be displayed" in IE 6.0 (haven't tried other
browsers) when the redirection happens. But the redirection happens
to the correct ftp location and on pressing "Refresh" the FTP login
dialog bar appears and everything is fine.
The difference in the 2 responses is key, I think.
Here is the HTML in question.

<META http-equiv='REFRESH' content = '3; URL = ftp://192.168.0.11'>

rewrite the Perl script that instead issues a real HTTP redirect
instead of quasi-standard <meta http-equiv> junk.


Certainly good advice.
IE, as well as real Web browsers, should handle this much better.


If by real web browsers you mean those with appropriate (IMHO) accept
headers, then I agree, they will handle it better. (Though a text link
may still be preferable.)

IE/Win is another matter. I'm not sure what its accept headers will mean
for the ftp protocol. See also my first note in this thread for a brief
explanation.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #4
Manu wrote:
html page which just redirects users to my ftp server. The problem is
I get a "page cannot be displayed" in IE 6.0 (haven't tried other
browsers)

You probably should try other browsers. ;-)
ftp://192.168.0.11
I just tried that address in Mozilla 1.6/Win; operation timed out. Tried
it in MSIE 5.5/Win; the "browser" changed into an os thingy of some
sort; error, "Windows was unable to browse this folder." Looks like the
problem is server related.
when the redirection happens. But the redirection happens
to the correct ftp location and on pressing "Refresh" the FTP login
dialog bar appears and everything is fine.


Given the two different results in IE/Win, I'd have to think it has to
do with the change in accept headers. But then, on reflection, I don't
know how MSIE/Win reacts to an ftp server, and I don't have the means to
test it. Apologies if my earlier post turns out to be a red herring.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #5
Brian <us*****@julietremblay.com.invalid> wrote in message news:<10*************@corp.supernews.com>...
Given the two different results in IE/Win, I'd have to think it has to
do with the change in accept headers. But then, on reflection, I don't
know how MSIE/Win reacts to an ftp server, and I don't have the means to
test it. Apologies if my earlier post turns out to be a red herring.


Does the FTP protocol even use "accept headers"?

--
Dan
Jul 20 '05 #6
Daniel R. Tobias wrote:
Brian wrote...
Given the two different results in IE/Win, I'd have to think it has
to do with the change in accept headers. But then, on reflection, I
don't know how MSIE/Win reacts to an ftp server, and I don't have
the means to test it. Apologies if my earlier post turns out to be
a red herring.


Does the FTP protocol even use "accept headers"?


I don't know, but when the question is posed so bluntly, it seems like
the answer is no. Why would it? How would it? It makes no sense. The
more I think about it, the more I think my initial response was barely
half-baked. My apologies. The change on reload sent me running in the
wrong direction. (I was unable to connect using Mozilla, as well as IE,
so it perhaps the op was seeing nothing more than an unresponsive server.)

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #7
Brian <us*****@julietremblay.com.invalid> wrote
Why don't you just provide a link to the ftp server? Are users incapable
of following a link?
In the end thats what I did. The problem really happened when the web
+ FTP server was configured to DHCP (from a static IP) in our
intranet. Originally I had a link from index.htm to
ftp://staticIPofTheServer as the FTP link. When the server moved to
DHCP I thought I could just change the link to point to ftp.pl which
then redirects it to the FTP server. Also I didn't want users follow 2
links instead of just 1 to get to the FTP server. Now I have my
index.htm with an IFRAME (links.pl) which generates the correct FTP
link and solved the problem.

You probably should try other browsers. ;-)
I use linux/mozilla and the command prompt to FTP, but 90% of my
office uses IE6.0 and don't like change.

I just tried that address in Mozilla 1.6/Win; operation timed out. Tried
it in MSIE 5.5/Win; the "browser" changed into an os thingy of some
sort; error, "Windows was unable to browse this folder." Looks like the
problem is server related.


Thats because you are not inside my intranet. Thats a class C IP
address. Its not a globally unique IP and is only used inside
intranets.
Thank you all for your advice and helping me work around this problem.
I would still be interested in knowing what the real problem was.
Jul 20 '05 #8
Manu wrote:
Brian wrote
I just tried that address in Mozilla 1.6/Win; operation timed out.
Thats because you are not inside my intranet.


You might have mentioned that in your op, saved me (and probably others)
some time.
Thank you all for your advice and helping me work around this problem.
I would still be interested in knowing what the real problem was.


Without a url accessible to us, I have no way of investigating any further.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jerry | last post by:
Hi All I would very much appreciate your help: I have two scripts alternating in the background triggering themselves mutually. Here is how: 1.) Script A does something and then calls Script...
2
by: redirection | last post by:
Hey I made a lil program to where if a certain server is down i can redirect all the traffic to another server. I can goto this secure page, type in some info and it changes this one field My...
2
by: Lovely Redhead | last post by:
Hello, I was wondering if anyone knows of a good online tutorial to explain redirection with diffferent domains. I want to send people to different pages depending on what one of my registered...
2
by: Rick N. Backer | last post by:
Hello folks, Novice type question here. I'm working with a very simple app here that takes a series of strings from the console. Once the end user has finished inputting the strings they are...
10
by: Eric Lindsay | last post by:
This may be too far off topic, however I was looking at this page http://www.hixie.ch/advocacy/xhtml about XHTML problems by Ian Hickson. It is served as text/plain, according to Firefox...
5
by: Husam | last post by:
Hi EveryBody: In Vb.Net 2003 : How can I add HTML Code to windows application project ? for example: <HTML> <HEAD> <title>WebForm1</title> </HEAD>
13
by: souissipro | last post by:
Hi, I have written a C program that does some of the functionalities mentionned in my previous topic posted some days ago. This shell should: 1- execute input commands from standard input,...
1
by: comp.lang.php | last post by:
require_once("/users/ppowell/web/php_global_vars.php"); if ($_GET) { // INITIALIZE VARS $fileID = @fopen("$userPath/xml/redirect.xml", 'r'); $stuff = @fread($fileID,...
9
by: Nick | last post by:
Hi there, I'm passing an HTML encoded string to an URL in the query parameter. This query string works perfect in the website if you are already logged on, if you are not logged on the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.