Totally Zenned
- Join Date:
- Jan 2011
- Location:
- Adelaide, Australia
- Posts:
- 1,684
- Plugin Contributions:
- 0
GoDaddy shared server cPanel redirect issue - solved?
I had an issue with the cPanel redirect http:// >> http s://www on a GoDaddy shared hosting server not redirecting (not a problem on my other host in Oz) - after entering the redirect the site would not load - browser messages indicated domain redirect was configured such that it would not redirect properly. After two calls to their 'techos' I finally was told that their shared servers are configured not to accept the cPanel redirects so they added code to the .htaccess file which only redirected http > https which wasn't the issue anyway. :no:
So I found the code below which is generic and when added to the .htaccess file to the very top it does the trick - I use Ultimate Friendly SEO Url's (USU) so the .htaccess file already has a bunch of rewrite rules and this inclusion (at very top) doesn't create ant issues with USU.
I am posting this in here as I figure that this could be a standard issue with GoDaddy shared servers/cPanels and hence potentially problematic for other Zenners.
cheers,
Mike
# Redirect to www for GoDaddy
RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]