Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

my .htaccess is broken

edited December 2017 in Support Forums

pretty much anything i put into htaccess results in an error due to being redirected too many times.
this also affects all of my sites apparently.

i also accidentally removed the main htaccess file that isn't editable

i've tried everything, please help.

Comments

  • On what URL do you see the redirection error? I just tried to open your website and everything was working fine for me.

    You may want to try it in private browsing mode as well, because it may just be browser cache giving you these problems.

  • @Admin said:
    On what URL do you see the redirection error? I just tried to open your website and everything was working fine for me.

    You may want to try it in private browsing mode as well, because it may just be browser cache giving you these problems.

    The reason everything is fine now is because I removed the .htaccess so i could access the site again
    i have tried accessing the site from multiple devices and have cleared cookies several times but it doesn't work regardless

  • @ReTex1t said:

    @Admin said:
    On what URL do you see the redirection error? I just tried to open your website and everything was working fine for me.

    You may want to try it in private browsing mode as well, because it may just be browser cache giving you these problems.

    The reason everything is fine now is because I removed the .htaccess so i could access the site again
    i have tried accessing the site from multiple devices and have cleared cookies several times but it doesn't work regardless

    The problem likely isn't cookies, it's browser cache. Browsers may remember redirects for some time as well, but that's not caused by cookies.

  • @Admin said:

    @ReTex1t said:

    @Admin said:
    On what URL do you see the redirection error? I just tried to open your website and everything was working fine for me.

    You may want to try it in private browsing mode as well, because it may just be browser cache giving you these problems.

    The reason everything is fine now is because I removed the .htaccess so i could access the site again
    i have tried accessing the site from multiple devices and have cleared cookies several times but it doesn't work regardless

    The problem likely isn't cookies, it's browser cache. Browsers may remember redirects for some time as well, but that's not caused by cookies.

    I believe I cleared the cache as well.

  • edited December 2017

    Bump.
    It doesn't work even when I try connecting from browsers and locations in which I've never accessed the site from before. Please help.

    I left the htaccess enabled for the time being if you want to check it for yourself.

  • Can you gave me your .htacess file so I can take a look?

  • edited December 2017

    my .htaccess was simply this:
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    also in addition, now the site always gives me this redirect problem even though i've cleared cookies and deleted all of my .htaccess files.

  • Hmm, try to switch browsers, anyway, may i know your website URL and what platform/CMS it runs?

  • @ReTex1t said:
    my .htaccess was simply this:
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    also in addition, now the site always gives me this redirect problem even though i've cleared cookies and deleted all of my .htaccess files.

    That snippet won't work because of how our systems are set up. Please try this snippet instead: https://infinityfree.net/support/how-to-force-all-traffic-to-https

    For the curious techies: we combine both nginx (which is faster) and Apache (for .htaccess support) to run websites. SSL is handled by nginx, which then passes the request on to Apache with HTTP, so Apache thinks the request does not use SSL. That's why checking the HTTPS variable doesn't work on InfinityFree.

  • @Admin said:

    @ReTex1t said:
    my .htaccess was simply this:
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    also in addition, now the site always gives me this redirect problem even though i've cleared cookies and deleted all of my .htaccess files.

    That snippet won't work because of how our systems are set up. Please try this snippet instead: https://infinityfree.net/support/how-to-force-all-traffic-to-https

    For the curious techies: we combine both nginx (which is faster) and Apache (for .htaccess support) to run websites. SSL is handled by nginx, which then passes the request on to Apache with HTTP, so Apache thinks the request does not use SSL. That's why checking the HTTPS variable doesn't work on InfinityFree.

    Oh, that makes sense. That is the one I tried the first time.

This discussion has been closed.