JasonO Posted May 2, 2008 Share Posted May 2, 2008 Hi A basic question for most people here hehe. When visiting my website with https with www. you are promted that the site may not be trusted, blah blah blah.. as the certificate is for hosting4network and not www.hosting4network.co.uk . So, is there anything I should change in my cert to remove this promt from appearing for those that use www. I'm thinking that if I change it so the domain is www.hosting4network.co.uk , the error will appear on any domains without www. - is that what will happen? If not then I assume I would need 2 SSL certs or something? Thanks for your help, 0 Quote Link to comment Share on other sites More sharing options...
ur Posted May 2, 2008 Share Posted May 2, 2008 Your assumption is correct. However, if you want, you can use some simple .htaccess to send all users using "https://www.domain.com" to "https://domain.com" There are a few ways to do this, but this is the easiest: RewriteCond %{HTTPS} ==on RewriteRule ^(.*)$ https://domain.com/$1 [L,R=301] with the above you could add another condition so it only checks when it;s got the www in it. RewriteCond %{HTTP_HOST} !^www.domain.com$ Or, you can also use this to redirect all www. to just the domain: RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC] RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301] 0 Quote Link to comment Share on other sites More sharing options...
mylove4life Posted May 2, 2008 Share Posted May 2, 2008 I would get a new one for www 0 Quote Link to comment Share on other sites More sharing options...
uberhost Posted May 2, 2008 Share Posted May 2, 2008 I recommend ur's solution. You'll do better in the long run with your Google ranking that way, too. 0 Quote Link to comment Share on other sites More sharing options...
JasonO Posted May 2, 2008 Author Share Posted May 2, 2008 Hmm, it's not working for me I assume I change domain.com to my domain ? I've saved, restarted browser, and it still doesn't change/remove the www. with or without www. RewriteCond %{HTTPS} ==on RewriteRule ^(.*)$ https://hosting4network.co.uk/$1 [L,R=301] That right? I'm thinking of forcing https on all pages, so I assume it would be done in .htaccess - how would I do this? Thanks for your help guys, kind of a newbie at .htaccess. 0 Quote Link to comment Share on other sites More sharing options...
JasonO Posted May 3, 2008 Author Share Posted May 3, 2008 Ahh fixed it. I needed this at the top of the htaccess: RewriteEngine On Thanks for your help all 0 Quote Link to comment Share on other sites More sharing options...
ur Posted May 3, 2008 Share Posted May 3, 2008 Sorry, I did leave that out. Glad to hear you figured it out. Also note in certain environments you may also need to set the RewriteBase too. Cheers! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.