为什么我的网站将我重定向到本地主机?

发布于 2024-10-09 01:11:09 字数 1157 浏览 1 评论 0原文

好吧,我的网站有一些问题,我不确定是什么原因造成的。访问此页面 http://online-file-sharing.net/tos.html 并单击底部页脚链接之一...它会将您重定向到地址栏中的本地主机。我不知道它为什么这样做。我在我自己的服务器(即这台计算机)上托管此网站,并使用 Xampp。如果此信息有帮助。无论如何,任何帮助将不胜感激!我还使用 DYNDNS 作为我的名称服务器。

我已经在超级用户和 webapps QnA 网站上问过这个问题,但都没有帮助。他们说要来这里。另一件需要注意的事情是,该网站运行在一个脚本上,而不是多个脚本上(upload.cgi)。然而,有三个文件不是动态的,也不属于 upload.cgi 文件的一部分...它们是 about.html、browse.html 和 tos.html。

另一件需要注意的是,我的主页 upload.cgi 只能通过手动输入 online-file-sharing.net/cgi-bin/upload.cgi 来访问(这不是它的真实位置,但它似乎可以识别它)这样...但将我重定向到我的本地主机)。

.htaccess 文件代码:

DirectoryIndex upload.cgi 

我的 upload.cgi 路径代码:

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) = ();

我使用的脚本是 FileChucker。

我希望这些信息足以找到答案...如果没有,请告诉我,我将发布您需要的尽可能多的信息!

Alright, my website has some issues that I'm not sure what's causing them. Visit this page http://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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

回梦 2024-10-16 01:11:09

您的页脚链接是:

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

指向本地主机,因此它完全按照您的指示进行操作。

对于您的 upload.cgi,我返回的标头是:

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

注意 Location:http://localhost /... 在那里,它将浏览器重定向到本地主机。

Your footer links are:

<a href="http://localhost/">Home</a> – 
<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.

一梦等七年七年为一梦 2024-10-16 01:11:09

我已打开您的网站并检查 href 中的 url 是本地主机。那么您可能正在运行任何类型的开发服务器并且在本地主机下运行?我认为服务器的名称是 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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文