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.
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.
Thanks, We have already used .htaccess to redirect: ourdomain.com www.ourdomain.com http://ourdomain.com http://www.ourdomain.com all redirected to https://ourdomain.com but we can not find a code to redirect https://www.ourdomain.com to https://ourdomain.com Can you help with this?
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.