1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 505 Error - Infinite Loop Issue

Discussion in 'Troubleshooting and Problems' started by DaniD, Apr 24, 2015.

  1. DaniD

    DaniD Active Member

    Hi,

    Apparently my site is having a 505 error due to an infinite loop issue in my .htaccess file. This line is creating the issue:

    RewriteRule ^.*$ index.php [NC,L]

    I'm not sure what I should do with this line. Any help would be greatly appreciated - thanks!
     
  2. Sheratan

    Sheratan Well-Known Member

    Show us you full htaccess
     
  3. DaniD

    DaniD Active Member

    Code:
    #    Mod_security can interfere with uploading of content such as attachments. If you
    #    cannot attach files, remove the "#" from the lines below.
    #<IfModule mod_security.c>
    #    SecFilterEngine Off
    #    SecFilterScanPOST Off
    #</IfModule>
    
    ErrorDocument 401 default
    ErrorDocument 403 default
    ErrorDocument 404 default
    ErrorDocument 405 default
    ErrorDocument 406 default
    ErrorDocument 500 default
    ErrorDocument 501 default
    ErrorDocument 503 default
    
    <IfModule mod_rewrite.c>
        RewriteEngine On
    
        #    If you are having problems with the rewrite rules, remove the "#" from the
        #    line that begins "RewriteBase" below. You will also have to change the path
        #    of the rewrite to reflect the path to your XenForo installation.
        RewriteBase  /home/namesin/public_html
    
        #    This line may be needed to enable WebDAV editing with PHP as a CGI.
        #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
        RewriteCond %{REQUEST_FILENAME} -f [OR]
        RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^.*$ - [NC,L]
        RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
        RewriteRule ^.*$ index.php [NC,L]
    </IfModule>
    
    This is the full code for my htaccess file that I'm using. I'm also running Apache and it's installed in the root.
     
  4. Tracy Perry

    Tracy Perry Well-Known Member

    Try commenting out the RewWriteBase (and I think that it's incorrect the way you have it anyway).
     
  5. DaniD

    DaniD Active Member

    It's working now. There was an issue with an index file that was loading in the root, not the index.php file. Thanks everyone. :)
     
  6. Tracy Perry

    Tracy Perry Well-Known Member

    Was it trying to load an index.html/htm? If so, you need to modify the HTTP vhost so that it uses index.php before index.html/htm. That way, if you ever do get an index.html/htm in the root, it won't overide the index.php.
     

Share This Page