473,748 Members | 2,227 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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><HEA D>";
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 5983
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*****@juliet remblay.com.inv alid> wrote in message news:<10******* ******@corp.sup ernews.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*****@juliet remblay.com.inv alid> 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
2005
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 B through the header() function. Using something like header("Location:http//mydomain.com/scriptb.php");
2
1227
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 thought is that this page (below) reads where the "place" is. If the thing it calls is a "1" than it will goto this page, and any other character will goto the other pages. The problem with this is for some reason the code isnt workign below. I think...
2
1391
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 domain names they choose.I'm working with a web center that provides me the ability to have 4 different names for my site, but they all point to my index. I want certain names to go to certain pages in my group. I've seen code but I think my...
2
4700
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 individually processed and the result displayed back to the console. The problem I am having occurs during I/O redirection. Here is where
10
3521
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 Response Headers - http://www.hixie.ch/advocacy/xhtml Date: Wed, 23 Nov 2005 21:36:06 GMT Server: Apache/1.3.33 (Unix) DAV/1.0.3 mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a PHP/4.3.10 mod_ssl/2.8.22 OpenSSL/0.9.7e Vary: Accept-Encoding,User-agent
5
4074
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
2705
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, and also from a file conatining the commands 2- does the redirection of the input and output from and to files. 3- retrieve the environment variables like HOME,..
1
3530
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, @filesize("$userPath/xml/redirect.xml")); @fclose($fileID); // XML PARSE
9
2008
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 application calls FormsAuthentication.RedirectToLoginPage() then the URL becomes malformed. I then recieve the following error, "The return URL specified for request redirection is invalid."
0
8831
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9552
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9376
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9249
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8245
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.