Urgent Help Needed For A Simple Forwarding Fix

Discussion in 'PHP' started by bonkerbids, Feb 28, 2008.

  1. #1
    We are trying to find a code or any way possible to forward a url to eliminate an invalid security certificate error. What we need is the following:

    We want to forward the url

    https://www.ourdomain.com to go to https://ourdomain.com without the www.

    Does anyone know of a code we can use to put in a .htaccess file or any other means that will accomplish this.

    Thanks in advance.
     
    bonkerbids, Feb 28, 2008 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    You should probably use .htaccess to redirect your visitors. PHP can end up redirecting endless loops, and you would need to redirect each page individually.However, this can really hurt any search engine rankings if done incorrectly, so make sure you are doing the correct redirects, if you plan on redirecting indexed pages. mysite.com is not www.mysite.com.
     
    jestep, Feb 28, 2008 IP
  3. bonkerbids

    bonkerbids Active Member

    Messages:
    986
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    80
    #3
    bonkerbids, Feb 28, 2008 IP
  4. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #4
    Does you server use separate folders for secure and non-secure files (IE: public_html, public_ssl)

    If so, you would need to put a htaccess file in the secure directory as well. Otherwise the www.ourdomain rule should cover both http, and https.
     
    jestep, Feb 28, 2008 IP
  5. RoscoeT

    RoscoeT Peon

    Messages:
    78
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I agree, this is the most likely cause of this.
    And PHP is not really the answer here.
     
    RoscoeT, Feb 28, 2008 IP