Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2010
    Thanked 0 Times in 0 Posts

    Post Rewrite from https to http? HELP!


    I have met a problem with the rewrite of my .Htaccess.

    Now i have my entire site to be rewrite'ed from http://www.mysite.com to https://secure.mysite.com
    and it's encoded in my .htaccess:

    [code] Options +FollowSymlinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^secure.mysite.com [NC]
    RewriteRule ^(.*)$ https://secure.mysite.com/$1 [L,R=301] [/ code]

    In this way, every single page redirected to my secure server at https://secure.mysite.com
    It works very well and so it shall remain.

    but there is a single page, which I do not want to become rewrite'ed,
    eg I do not want to http://www.mysite.com/page1.php be rewriteed to https://secure.mysite.com/page1.php
    it is the only urI do not want it to rewrite,

    what should I add more to the code I have currently?

    I hope you could help ..
    ps. I am not an expert so I may like to write what to add to my code: wink:

    Sincerely, Martin

  • #2
    Senior Coder angst's Avatar
    Join Date
    Apr 2004
    Toronto, Ontario
    Thanked 122 Times in 122 Posts
    something like this should do;

    RewriteEngine On 
    RewriteCond %{SERVER_PORT} 80 
    RewriteCond %{REQUEST_URI} somefile.php
    RewriteRule ^(.*)$ https://www.domain.com/somefile.php [R,L]


    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts