tquang |
02-07-2014 02:41 AM |
Apache and problem with redirect between HTTP and HTTPS
Dear everyone,
I installed Apache 2.2.4 and I have problem with redirect. Please help me and below my config (also what I need to run for my site)
My Apache had configurated with SSL and auto redirect from non SSL to SSL (HTTP > HTTPS)
Code:
<VirtualHost *:80>
ServerName ABC.COM
ServerAlias www.ABC.COM
<Location />
Redirect permanent / https://ABC.COM/
</Location>
</VirtualHost>
<VirtualHost *:443>
ServerName ABC.COM
ServerAlias www.ABC.COM
DocumentRoot /home/ABC/www/ABC.COM
<Directory /home/ABC/www/ABC.COM>
DirectoryIndex index.html index.php
Order allow,deny
Allow from all
</Directory>
SSLEngine on
SSLCertificateFile /usr/local/apache/conf/ssl.crt
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key
SSLCertificateChainFile /usr/local/apache/conf/ssl.crt
</VirtualHost>
So, above the config is good and no problem until in this site had link like as: ABC.COM/TEST (ABC.COM/TEST/view?code=12)
At this link, I want to redirect it from HTTPS to HTTP for this link only, but I don't know way to do.
Default is HTTPS for all, but ABC.COM/TEST (also ABC.COM/TEST/view?code=12) is HTTP only
Please help me. Thank so much
|