gingera
asked on
HTTPS - How to direct http://www.mydomain.com/here.php to https://www.mydomain.com/here.php?
HTTPS SSL PHP HTML Apache Linux
Hello,
How can I redirect people visiting - How to direct http://www.mydomain.com/here.php (NON-SSL) to https://www.mydomain.com/here.php (SSL)?
Thanks.
Hello,
How can I redirect people visiting - How to direct http://www.mydomain.com/here.php (NON-SSL) to https://www.mydomain.com/here.php (SSL)?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi caterham_www,
RewriteEngine on
RewriteCond %{HTTPS} =off
RewriteRule ^(here\.php)$ https://www.mydomain.com/$1 [R=301,L]
works like a charm! Thanks!
RewriteEngine on
RewriteCond %{HTTPS} =off
RewriteRule ^(here\.php)$ https://www.mydomain.com/$1 [R=301,L]
works like a charm! Thanks!
Hm the PHP code works perfect on my server.
ASKER
I tried again. It works! Sorry my fault, I didn't complete the PHP script to test it properly.
THANKS!
THANKS!
ASKER
THANKS for your help!
ASKER
Because it only affects a few files, I don't really want to change the httpd.conf. .htaccess or PHP check is better.
I tried your codes but it doesn't redirect?
Is there anything wrong with
Open in new window