【发布时间】:2014-02-06 10:18:24
【问题描述】:
我正在使用 Wordpress 在 Intranet 上工作,并在 Apache (httpd-vhosts.conf) 中进行设置,以便像这样以 intranet or intranet.domain.lcl 访问 Intranet:
Listen 80
<VirtualHost 10.241.9.147:80>
DocumentRoot "C:/www/intranet"
ServerName intranet.domain.lcl
ServerAlias intranet
<Directory "C:/www/intranet">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 10.240.9 10.241.9
</Directory>
</VirtualHost>
在 Wordpress 设置中,我将站点 Wordpress 地址 URL 和站点地址指定为 http://intranet.domain.lcl/wp
我遇到的问题是我使用 PHP 会话来记录用户,我注意到如果:
- 用户通过
intranet登录,如果他转到intranet.domain.lcl,他没有登录 - 反之亦然,如果用户通过
intranet.domain.lcl登录,如果他转到intranet,则不会登录
即使没有我的脚本通过 php 会话记录用户并使用 wordpress logi 自然方式,我也进行了测试,但问题仍然相同。
有什么线索吗?
谢谢
【问题讨论】:
标签: php apache session alias server-name