/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^example.com [nc] rewriterule ^(.*)$ http://www.example.com/$1 [r=301,nc] rewritecond %{SERVER_PORT} !^443$ rewriterule ^filename\.php(.*)$ https://www.example.com/filename.php$1 [r=301]
URL: http://www.mcgwebdevelopment.com/blog/2008/01/redirect-only-specific-files-from-http-to-https/