• I’m having an issue with my wordpress site that is hosted by siteground. I’ve spent hours trying to solve with no success. Siteground support says that I should get a webdeveloper, but I think it is actually an issue with their nginx
    server so they would have to fix it on their end (I don’t have access to nginx server settings).

    If I visit https://cordvision.com it gets redirected to https://www.cordvision.com/ which then gets redirected to https://www.cordvision.com/.

    I want it to go directly to https://www.cordvision.com/.

    Here is what I believe is the relevant information:

    My .htaccess file:

    <IfModule mod_rewrite.c>

    RewriteCond %{HTTP_HOST} !^www\. [NC]

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

    RewriteCond %{HTTP:X-Forwarded-Proto} !https

    RewriteCond %{HTTPS} off

    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    </IfModule>
    BEGIN WordPress

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /

    RewriteRule ^index\.php$ – [L]

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule . /index.php [L]
    </IfModule>

    END WordPress

    My WordPress Setting

    WordPress Address: https://www.cordvision.com
    Site URL: https://www.cordvision.com

    DNS Zone File Screenshot of relevant entries:
    https://i.stack.imgur.com/Rwvpl.png

    I’m using cloudflaire through siteground (dns handled by siteground)

    (I found that https://www.redirect-checker.org/index.php might offer some useful information for trouble shooting)

    Any chance somebody can identify what causes the unnecessary redirect? Could it be indeed an nginx redirect? Any help is appreciated!

    • This topic was modified 4 years, 10 months ago by cordvision.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Is the Nginx acting as a reverse proxy?

    If Nginx is your actual webserver instead of Apache then your htaccess is probably not doing you any good and that might be why SiteGround is suggesting you hire a web dev.

    If Nginx is just a reverse proxy then the htaccess is controlling the Apache box.

    If it was me I’d turn off the Cloudflare proxy and see if those Cnames are causing this problem…

    I went to look but Cloudflare is in my way so I couldn’t see your origin server. You might ask Cloudflare for some help also.

    If the server is Nginx then you’ll need to convert your htaccess directives to something Nginx can understand and place that into Nginx’s config file.

    Thread Starter cordvision

    (@cordvision)

    @jnashhawkins I was under the impression that it is used for cache delivery but all this is far above my head (I only have a fairly basic understanding).
    I found this on the topic: https://www.siteground.com/blog/nginx-direct-delivery/

    I just paused cloudflare, can you see it now?

    When I use https://www.redirect-checker.org/index.php and enter https://cordvision.com, it mentions “Nginx” as the first server of the redirection.

    • This reply was modified 4 years, 10 months ago by cordvision.

    I looked and see Nginx so you’ll need to fix your htaccess directives to Nginx config unless there’s an Apache server there that I can’t see.

    So you might ask your host for help or guidance with that or else a reassurance that there is Apache behind that Nginx acting as a reverse proxy so your htaccess should work.

    With Cloudflare off are you seeing the same problems? I don’t see anything odd here but I don’t see ‘www’ in the address either.

    What I do see is what I’d prefer as www just isn’t all that important to me.

    Thread Starter cordvision

    (@cordvision)

    @jnashhawkins
    Thank you for looking into it!
    The issue is that I get a double re-direct, which negatively affects my page loading speed and my SEO rating. I just needed to get some reassurance that it is indeed likely an issue with the Nginx config. I think siteground support is slowly getting annoyed at me because I had several support requests in the last few days (although I think I was justified contacting them in most cases as they all related to issues that could only be fixed on their end).
    I’ll post the final solution if I find one in case someone else has a the same issue…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Siteground: Multible redirects’ is closed to new replies.