Redirecting www to non-www links

Discussion in 'Joomla' started by sarah_23, Nov 11, 2014.

  1. #1
    Hi i have joomla 3.x installed with ssl. Now my problem is when some one visit my website with https://www.mydomain.com it shows untrusted connection. I want to redirect the page when some one enter's my site with www to nonwww https://mydomain.com/

    Can some one please guide me how to do that. Thanks in advance.
     
    sarah_23, Nov 11, 2014 IP
  2. rswebsols

    rswebsols Active Member

    Messages:
    21
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    60
    #2
    You can try to add the following code in your server's .htaccess file:

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
    RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
    Code (markup):
     
    rswebsols, Nov 15, 2014 IP
  3. sarah_23

    sarah_23 Active Member

    Messages:
    150
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    78
    Digital Goods:
    1
    #3
    Thank you, It works for me. Thanks again !
     
    sarah_23, Nov 16, 2014 IP