• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Redirect loop spotted in previous developers code

I have taken over from a previous developer, and came across some wierd error. Whenever I change his config page - base url from


http://{internal ip address}/sitex/

I get a redirect loop. When I change it back, everything works fine, but no one else can access the site (as all links and css references have base_url().

Does anybody know what could cause such errors?

I will happily post any code required...


You might want to check your .htaccess file for any links back to the original URL


Here is the htaccess file.

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /GENERIC

    #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]

    #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]

<IfModule !mod_rewrite.c>
    # 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

GENERIC being the folder on the localhost with the site.

Here is the first part of config:

&lt;?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

| Base Site URL
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|    http://example.com/
$config['base_url']    = "http://localhost/GENERIC/";

Whenever I replace localhost with the IP address, I get the redirect loop.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.