Results 1 to 7 of 7
  1. #1

    Redirect from https >> http

    Hi everyone

    I need to permanently redirect a page form an https address to an http address.

    I want to do this via a .htaccess file

    I need to redirect the following...

    https://subdomain.domain.co.uk/

    to

    http://www.domain.co.uk/

    Can anyone help please?

    Thanks!

  2. #2
    Join Date
    Feb 2003
    Location
    Media, PA
    Posts
    91
    try

    Code:
    RewriteEngine On
    RewriteCond %{HTTPS} = on
    RewriteRule (.*) http://domain.co.uk$1 [R]
    in your subdomain directory
    Devin Zuczek
    Versus Technologies

  3. #3
    It didn't work Im afraid although there were no errors.

  4. #4
    Join Date
    Feb 2006
    Location
    New York, NY
    Posts
    92
    put this in your .htaccess of the directory:


    Code:
    RewriteEngine On 
    
    RewriteCond %{SERVER_PORT} !=443 
    
    RewriteRule ^ http://domain.com%{REQUEST_URI} [NS,R,L]
    replace http://domain.com with your domain name.

  5. #5
    That also didn't wotk Im afraid !

  6. #6
    Join Date
    Feb 2003
    Location
    Media, PA
    Posts
    91
    how about

    Code:
    RewriteEngine On 
    
    RewriteCond %{SERVER_PORT} =443 
    
    RewriteRule ^ http://domain.com%{REQUEST_URI} [NS,R,L]
    the last one was saying "if its not secure, redirect to not secure". this says if server port is 443 then go to http:// . one last try haha
    Devin Zuczek
    Versus Technologies

  7. #7
    Join Date
    Aug 2005
    Location
    UK
    Posts
    654
    I do it the other way around HTTP querys get forwarded to HTTPS.. I just have a second vhost that manages the HTTP that as Redirect / https://domain.com/ in the vhost block of http.conf

Posting Permissions

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