开发者

Rewrite from https to http

I have 5 sites on one apache server. One o开发者_JS百科f the sites is with SSL. So when the other sites are accessed with https then they are redirected to the SSL site which is incorrect.

E.g.

https://x.com (with SSL)

http://y.com (normal site no SSL)

If I access https://y.com then I get the content from x.com. How can I fix so https://y.com just gets rewritten to http://y.com?


In your .htaccess put:

RewriteCond %{HTTPS} on [NC]
RewriteRule ^(.*)$ http://y.com/$1 [R=301,L]


You can define it in apache config file. You must add a rule to connection incoming from https port.

If you are using linux, propably you have this config in /etc/apache2/sites-available/default-ssl.

If you don't have this file you must searching https virtualhost:

<IfModule mod_ssl.c>
<VirtualHost _default_:443>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜