Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
缩短URL_Url - Fatal编程技术网

缩短URL

缩短URL,url,Url,我正在本地主机WAMP服务器上开发一个站点。在显示index.php之前,我有一个机密页面要显示。下面是我的机密性.php代码: <?php $body =""; $body .= " <p> By clicking on the Enter button below to access...... </p> <form action='http://hello.com' method='GET'> <input type='sub

我正在本地主机WAMP服务器上开发一个站点。在显示index.php之前,我有一个机密页面要显示。下面是我的机密性.php代码:

<?php
$body ="";
$body .= "
<p>
    By clicking on the Enter button below to access......
</p>
<form action='http://hello.com' method='GET'>
    <input type='submit' value='Enter'/>
</form>";
echo $body;
?>

WAMP服务器和大多数默认的apache配置将从根目录中创建index.php服务器,因此,如果您将其用作index.php,应该可以解决您的问题。

您能简要介绍一下吗。好的。它实际上不在本地主机服务器上,我已经编辑了这个问题。你能再查一下吗?我的建议是把这个页面作为index.php放在你网站的根目录中。Web服务器将在访问hello.com时提供此服务,这似乎是目标。感谢您的回复,我如何避免端口号?如果您使用标准http端口80,则不需要端口号。如果没有,您可以将端口80从路由器转发到您的Web服务器设置的任何位置,或者您可以进行一些奇特的防火墙配置(我不知道)。为什么您的生产Web服务器在8080上?您可以通过在端口80上运行另一个轻量级web服务器(nginx、lighttp等)实现一种“脏”解决方案,并简单地重定向到您真正的服务器所在的端口。