Posted By

Tate on 01/27/08


Tagged

modrewrite htaccess


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

hellion


Redirect A Single Page To HTTPS Using mod_rewrite


 / Published in: PHP
 

URL: http://www.mcgwebdevelopment.com/blog/2008/01/redirect-only-specific-files-from-http-to-https/

  1. Options +FollowSymlinks
  2. RewriteEngine on
  3. rewritecond %{http_host} ^example.com [nc]
  4. rewriterule ^(.*)$ http://www.example.com/$1 [r=301,nc]
  5.  
  6. rewritecond %{SERVER_PORT} !^443$
  7. rewriterule ^filename\.php(.*)$ https://www.example.com/filename.php$1 [r=301]

Report this snippet  

You need to login to post a comment.