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認證雖然,改寫了驗證後發生。