【发布时间】:2014-11-06 16:40:24
【问题描述】:
我在 htaccess 中有一些 RewriteRule,以便为我的登录页面提供一些漂亮的 url。该网址可能看起来像 www.site.com/new-document,而我的 RewriteRule 将使 www.site.com/index.php?page=new-document
这样我可以留下漂亮的 url 并使用 index.php 来根据页面变量更改文本。
在 http 上一切正常,但是一旦我将 https 添加到 url,我就会收到 Not Found 错误,因为 RewriteRule 没有触发。
这是我的 htaccess 代码的副本
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^new-document$ index.php?page=new-document
RewriteRule ^old-document$ index.php?page=old-document
</IfModule>
【问题讨论】:
-
确保 https 站点的
DocumentRoot与 http 相同
标签: php apache .htaccess mod-rewrite