2011-08-23 70 views
0

我的新主机使用SSL的代理,在我的旧主人,我可以在htaccess的使用规则:htaccess以及SSL代理

#old host 
Options +FollowSymLinks 
RewriteEngine On 
RewriteBase /folder 

SSLOptions +StrictRequire 
SSLRequireSSL 
SSLRequire %{HTTP_HOST} eq "www.website.eu" 
ErrorDocument 403 https://www.website.eu/folder 

但这并我的新主机上使用SSL代理我试过不行以下但没有运气:

#new host 
Options +FollowSymLinks 
RewriteEngine On 
RewriteBase /folder 
RewriteCond %{HTTP:X-SSLproxy} !Yes 
ErrorDocument 403 https://www.website.eu/folder 

我该如何做这项工作?

谢谢!

+0

偏离主题。请阅读[FAQ](http://stackoverflow.com/faq)。 –

回答

0

使用这种替代的ErrorDocument行:

RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L] 

我不认为它的工作原理,如果你使用的是Apache认证虽然,改写了验证后发生。