【发布时间】:2013-03-23 10:31:41
【问题描述】:
关于将 locahost 站点移动到服务器以使其在 Internet 上可用,我几乎没有概念性疑问.....步骤是什么...服务器将如何识别我的 apache 和php 配置文件..我在 apache 2.2 上用 php 和 mysql 建立了一个网站
注意事项:
-
我在我的 apache 配置文件中做了一些更改。其中之一是我 在 “DirectoryIndex”...所以现在我的 DirectoryIndex 看起来像:
<IfModule dir_module> DirectoryIndex index.html index.php </IfModule> 所以现在我的 apache 会自动告诉浏览器在调用 header('LOCATION:') 或 refresh 时搜索 index.php 文件。很明显,我的 index.php文件包含将显示或显示的 html 和其他 php 代码
第三个也是最重要的...我在构建网站时在很多情况下都使用了标题功能...我的标题功能类似于
header('Location: http://localhost/home/');
所以再次重复这个问题
-
根据我的网站名称上传时我是否应该更改所有标题功能 即
header('Location: http://www.my_site_name.com/home/');代替header('Location: http://localhost/home/'); - 我的远程服务器将识别我在配置文件中所做的更改并根据更改工作
- 以及将网站上传到互联网的步骤是什么
【问题讨论】:
-
使用常量存储
http://localhost/和replacing strings in multiple files
标签: php apache web-config localhost remote-server