【发布时间】:2017-07-10 20:53:21
【问题描述】:
我目前正在使用 EasyEngine 在 Nginx 服务器上运行 IPS 社区套件论坛,并且我一直在尝试找到一种将 http://example.com/ 重定向到 http://example.com/index.php 的方法(仅当它只是域时)。这是我当前的服务器 Nginx 配置:
server {
listen 80;
listen 443;
ssl on;
ssl_certificate /var/www/example.com/cert.pem;
ssl_certificate_key /var/www/example.com/key.key;
server_name example.com www.example.com;
access_log /var/log/nginx/example.com.access.log rt_cache;
error_log /var/log/nginx/example.com.error.log;
root /var/www/example.com/htdocs;
index index.php index.html index.htm;
include common/wpfc.conf;
include common/wpcommon.conf;
include common/locations.conf;
include /var/www/classicaddons.com/conf/nginx/*.conf;
}
任何帮助将不胜感激!
【问题讨论】:
-
你为什么要这样做?
-
ceejayoz,我一直遇到身份验证问题,当它位于example.com/index.php(或基本上是除example.com 之外的任何页面)时,一切正常。我只是认为这将是最简单的修复解决方案。
-
这听起来像是你应该调查和修复的事情,而不是仅仅用一个 hacky 解决方法来修补它。
标签: php redirect nginx invision-power-board