If this is your first visit, check our documentation. To post, register or login.
Forums / Search Engines / GoDaddy shared server cPanel redirect issue - solved?

GoDaddy shared server cPanel redirect issue - solved?

Started by shags38 on 19 Sep 2017, 1:43 AM · Views: 96

Results 1 to 7 of 7
19 Sep 2017, 1:43 AM
#1
shags38 avatar

shags38

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]
19 Sep 2017, 3:25 AM
#2
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: GoDaddy shared server cPanel redirect issue - solved?

Mike, get rid of Gone Daddy. Best move you ever make in hosting.

Just my 5 cents

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

19 Sep 2017, 4:00 AM
#3
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: GoDaddy shared server cPanel redirect issue - solved?

frank18:

Mike, get rid of Gone Daddy. Best move you ever make in hosting.

Just my 5 cents

I will Frank but I needed to host a dotcom domain and I had a GoDaddy account sitting there doing nothing, so it was convenience - I have already put the feelers out for a suitable host with U.S. based servers but am yet to find one that is 'apparently' good (by whose account?) and is affordable.

cheers,
Mike

best U.S. based host I have used in the past was VentraIP when they had U.S. based servers but they don't have them anymore

19 Sep 2017, 9:19 AM
#4
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: GoDaddy shared server cPanel redirect issue - solved?

shags38:

I will Frank but I needed to host a dotcom domain and I had a GoDaddy account sitting there doing nothing, so it was convenience - I have already put the feelers out for a suitable host with U.S. based servers but am yet to find one that is 'apparently' good (by whose account?) and is affordable.

cheers,
Mike

best U.S. based host I have used in the past was VentraIP when they had U.S. based servers but they don't have them anymore

You can host any dotcom domain on an Aussie server, I have 2 hosted on my Sydney based Equinix 3 server.

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

19 Sep 2017, 9:52 PM
#5
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: GoDaddy shared server cPanel redirect issue - solved?

frank18:

You can host any dotcom domain on an Aussie server, I have 2 hosted on my Sydney based Equinix 3 server.

Thanks Frank for your response - if the geo target is 'unlisted' (global) then hosting in Oz or any country is fine - if on the other hand the geo target is specifically the U.S. (which is the case with this site) then it is advantageous to host in the U.S.

cheers,
Mike

21 Sep 2017, 5:42 PM
#6
terragirl avatar

terragirl

Zen Follower

Join Date:
Jun 2010
Location:
Austria
Posts:
123
Plugin Contributions:
0

Re: GoDaddy shared server cPanel redirect issue - solved?

I haven't tested this on GoDaddy but this is the code I use on my own servers to redirect to HTTPS and WWW:

<IfModule mod_rewrite.c>
RewriteEngine On

# Force HTTPS
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

# Force all traffic onto one domain with www (will redirect all aliases)
RewriteCond %{HTTP_HOST} !^www.example.com
RewriteRule ^ https://www.example.com%{REQUEST_URI} [R=301,L]

</IfModule>
22 Sep 2017, 3:12 AM
#7
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: GoDaddy shared server cPanel redirect issue - solved?

terraGirl:

I haven't tested this on GoDaddy but this is the code I use on my own servers to redirect to HTTPS and WWW:

<IfModule mod_rewrite.c> RewriteEngine On

Force HTTPS

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Force all traffic onto one domain with www (will redirect all aliases)

RewriteCond %{HTTP_HOST} !^www.example.com
RewriteRule ^ https://www.example.com%{REQUEST_URI} [R=301,L]

</IfModule> ```

Thanks for that terraGirl