【发布时间】:2014-02-28 08:51:42
【问题描述】:
我有一个主门户,现在这个门户将被不同的机构使用。
我的 apache 虚拟主机配置如下:
<VirtualHost *>
DocumentRoot "C:/xampp/htdocs/portal/exp1.php"
ServerName test.exp1.org
<Directory "C:/xampp/htdocs/portal/exp1.php">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *>
DocumentRoot "C:/xampp/htdocs/portal/exp2.php"
ServerName test.exp2.org.in
<Directory "C:/xampp/htdocs/portal/exp2.php">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
现在您可以看到我创建了不同的索引页面,例如 exp1.php 、 exp2.php
在每个索引页面中,我只写了这样的东西
header("Location: http://test.exp1.org/exp1.php/login/index/1")
所以现在这将调用登录控制器 -> 索引函数 -> 和参数为 1.. 所以基于这个参数,我将为特定的第一个机构加载相应的登录页面。
其他exp2.php也一样
header("Location: http://test.exp2.org/exp2.php/login/index/1")
所以现在这将调用登录控制器 -> 索引函数 -> 和参数为 2.. 所以基于这个参数,我将为特定的第二机构加载相应的登录页面。
当我在浏览器 http://test.exp1.org/ 上完成所有这些操作后,它向我显示了这个错误 页面没有正确重定向,实际上我希望它加载特定的根据url传入的参数查看。
这是我的文件夹结构
知道我是我的错误或我应该执行的所有步骤以正确重定向
【问题讨论】:
标签: php apache http-headers virtualhost codeigniter-url