我已经安装我的apache2configurationredirecthttp请求到https。 这工作正常但是我想改变它,所以只有当这个请求不是一个POST请求时才会这样做。
这是我目前的configuration:
RewriteEngine On
RewriteCond%{HTTPS}!=开启
- ProxyPass中从httpredirect到https
- 两个使用相同端口的Apache服务器?
- Django在apache / mod_wsgi / windows上进行multithreading
- 与虚拟主机的Apache日志通用分析器
- 如何redirectHTTP发布请求
RewriteRule ^ /?(。*)https://%{SERVER_NAME} / $ 1 [R,L]
我怎样才能改变这个configuration,以便它只在请求不是POST时redirect?
添加一个新的RewriteCond行:
RewriteEngine On RewriteCond %{HTTPS} !=on RewriteCond %{REQUEST_METHOD} !^POST$ RewriteRule ^/?(.*) https:// %{SERVER_NAME}/$1 [R,L]