开发者

Why Does My Website Redirect me to my localhost?

Alright, my website has some issues that I'm not sure what's causing them. Visit this page ht开发者_StackOverflowtp://online-file-sharing.net/tos.html and click one of the bottom footer links... it redirects you to your localhost in the address bar. I have no idea why it does this. I'm hosting this website on my own server, which is this computer, and using Xampp. If this information helps. Anyways any help would be greatly appreciated! I'm also using DYNDNS as my nameservers.

I've already ask this question on superuser and webapps QnA sites neither could help. They said to come here. Another thing to note is that this website runs on one script and not multiple scripts (upload.cgi). However there are three files that aren't dynamic and aren't part of the upload.cgi file... these are about.html, browse.html and tos.html.

Another thing to note is that my homepage which is upload.cgi can only be accessed by manually typing in online-file-sharing.net/cgi-bin/upload.cgi (which isn't it's real location but it seems to recognize it this way... but redirects me to my localhost).

.htaccess file code:

DirectoryIndex upload.cgi 

My upload.cgi path code:

my $version = "4.14";
$ENV{PATH} = '/bin:/usr/bin';
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
($ENV{DOCUMENT_ROOT}) = ($ENV{DOCUMENT_ROOT} =~ /(.*)/); # untaint.
#$ENV{SCRIPT_NAME} = '/cgi-bin/upload.cgi';
use lib './perlmodules';
#use Time::HiRes 'gettimeofday';
#my $hires_start = gettimeofday();
my (%PREF,%TEXT) = ();

The script I'm using is FileChucker.

I hope this information is enough to find an answer... if not please let me know and I'll post as much information as you need!


Your footer links are:

<a href="http://localhost/">Home</a> &#8211; 
<a href="http://localhost/filechucker.cgi?action=listfiles">Download Files</a> - 
<a href="#">TOS</a>

which point to localhost, so it's doing exactly what you told it to do.

For your upload.cgi, the headers I get back are:

HTTP/1.1 302 Found
Date: Sun, 26 Dec 2010 02:39:06 GMT
Server: Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1
Location: http://localhost/?&number_of_files=0&ip=xxx.xxx.xxx.xxx&host=&duration=2 seconds&act=upload_result
Content-Type: text/plain
Content-Length: 0
Connection: close

Notice the Location: http://localhost/... in there, which redirects the browser to localhost.


I have opened your site and checked that url in href is localhost. So it could be you are running any kind of development server and is running under localhost? The server my be thinking it's name is localhost!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜