HTTPS请求忽略重写规则 [英] HTTPS Requests Ignoring Rewrite Rule

查看:198
本文介绍了HTTPS请求忽略重写规则的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的.htaccess文件,对我的访问者创建搜索引擎友好的URL一个简单的重写规则。该规则over HTTP连接的伟大工程,但请求时取得了某些原因HTTPS规则被忽略。

I have a simple rewrite rule in my .htaccess file that creates search engine friendly urls for my visitors. The rule works great over http connections, but for some reason when the request is made over https the rule is ignored.

下面是.htaccess文件的内容:

Here is the contents of the .htaccess file:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z\-]+)/$ /$1.php [L]
</IfModule>

任何意见或建议,为什么HTTPS请求无视规则,但http请求确认规则?任何帮助将大大AP preciated。我花了谷歌和各种论坛上整天都无济于事。

Any ideas or suggestions as to why https requests ignore the rule, but http requests acknowledge the rule? Any help would be greatly appreciated. I spent the entire day on Google and various forums to no avail.

谢谢!

推荐答案

据我所知,你的规则有没有什么依赖于端口或协议上。我的猜测是,你的HTTP和HTTPS站点是根据不同的设置运行:他们要么使用不同的文档根目录或第二个没有的的AllowOverride 任何东西(它需要所有的FileInfo )。

As far as I can tell, your rule has nothing that depends on the port or protocol. My educated guess is that your HTTP and HTTPS sites are running under different settings: they are either using a different document root or the second does not AllowOverride anything (it needs All or FileInfo).

这篇关于HTTPS请求忽略重写规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆