Request exceeded the limit of 10 internal redirects

前端 未结 7 666
暗喜
暗喜 2020-11-29 07:08

My website has been slowed down a little last couple of days. I\'ve looked into my error log and found lots of these:

[Mon Sep 30 00:09:53 2013] [error] [c         


        
7条回答
  •  悲&欢浪女
    2020-11-29 07:17

    Looking to your htaccess I see that you use it to remove index.php from your url, but you are missing the RewriteBase, you can add it after the RewriteEngine On directly like this:

    
        RewriteEngine On
        RewriteBase /
    
        #Removes access to the system folder by users.
        #Additionally this will allow you to create a System.php controller,
        #previously this would not have been possible.
        #'system' can be replaced if you have renamed your system folder.
        RewriteCond %{REQUEST_URI} ^system.*
        RewriteRule ^(.*)$ /index.php?/$1 [L]
    
        #When your application folder isn't in the system folder
        #This snippet prevents user access to the application folder
        #Submitted by: Fabdrol
        #Rename 'application' to your applications folder name.
        RewriteCond %{REQUEST_URI} ^application.*
        RewriteRule ^(.*)$ /index.php?/$1 [L]
    
        #Checks to see if the user is attempting to access a valid file,
        #such as an image or css document, if this isn't true it sends the
        #request to index.php
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php?/$1 [L]
    
    
    
        # If we don't have mod_rewrite installed, all 404's
        # can be sent to index.php, and everything works as normal.
        # Submitted by: ElliotHaughin
    
        ErrorDocument 404 /index.php
     
    AddType image/x-windows-bmp bmp
    

    So, RewriteBase / will be valid if your application/website is not on a subdomain. However, if it is then you might need to add the folder name after the / symbol.

提交回复
热议问题