我已经生成的URL像禁用SSL上的某些URL Zend框架
http://miapp.com/module/controller/action/params/values
我想从SSL排除有一个参数(打印或下载)
其实一定URL的Zend的应用我有这样的.htaccess PARAMS到所有请求通过SSL重定向和生成动态URL重写
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule^https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ /index.php [NC,L]
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
但我怎么能排除的包含打印或下载的网址吗?
Ÿ尝试类似的东西:(但我得到重定向循环错误
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule^https://%{HTTP_HOST}%{REQUEST_URI} [R=301,NC,L]
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_REFERER} !^https(.*)/(print|download)(.*)$ [NC]
RewriteCond %{REQUEST_URI} !^(.*)/(print|download)(.*)$ [NC]
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,NC,L]
RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ /index.php [NC,L]
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
为什么从HTTPS连接重定向到HTTP连接?你为什么不把你的应用程序中的链接改为'http:// yourapp/path/to/download'? – vstm 2012-07-16 19:06:43
嗨@vstm主要原因是因为我们需要所有的应用程序运行SSL,只有两个资源de SSL关闭(Internet Explorer失败) – OsDev 2012-07-16 20:22:05