Admin page redirect-trouble

Hi CS-Cart experts.

I’ve just copied my live-shop to a test-shop on my server, for development.

I copied all the files and sql files for at total identical site, on a sub-domain. I changed the config.local.php for my new database informations, new site-name, altered the backend file name.

When launching my test-shop on the subdomain, everything is OK. But when i enter the admin page, for some reason it redirects the page to the live-shop url instead?

I’ve tried to ?cc the page, no results.

Double checked the $config[‘https_host’] so it has the sub-domain

Rewrite engine on and off in the .htaccess

When checking the http header status, it says 302 to exact same adresse.

Does anyone have an idea, where my problem is?

Live shop:

Test shop:

Thanks in advance,


Rewrite base/folder site name


Hi Johnbol1, can you specify what you mean with that?


As per the notes in the .htaccess file:-

[quote]# Some hostings require RewriteBase to be uncommented


Your store url is

So “RewriteBase” should be:

RewriteBase /store/cart

RewriteBase /[/quote]

Your subdomain will be in a folder such as /devstore/, therefore uncomment the last line in the above to read:-
RewriteBase /devstore

What version and what edition? If you are running Ultimate (V3 or V4) you will probably have to edit the database to change the admin url to the new domain. Should be a column in cscart_companies I think.

The rewrite base didn’t do the trick :(

I’m running V3, and if I search my db trough for “”, it only finds static names and such, no redirects :(


it only finds static names and such


what does that mean? Are you meaning that it is only embedded within descriptions and other “content” but is not seen as any column value? What was the actual search string you used in the LIKE query?

Tony is correct on this one, the cscart_companies table is only populated if you are running Ultimate with 2+ stores and does need to be updated if you copy the live store to a development directory. As far as I'm aware, you don't need to do anything to the database for a Pro install, only Ultimate. I just searched the database for “LIKE %adminloginurl%” (where admin URL is and found nothing.

I actually have a V3 store I am working on just now which is running V3 Pro, and I'm working on the development site, the only changes required from copying the live store from the root to /development/ folder were:-

In /development/.htaccess

RewriteBase /development

In /development/config.local.php

$config['http_host'] = '';

Via FTP, delete:-

/development/var/cache/ (all contents/subdirectories)


If you still have the redirect loop, try another web browser or clear your browsers cache.

Thanks for your input StellarBytes.

Unfortunately it didn’t solve my problem.

I’m starting get a bit frustrated since I cannot figure out where to root of this problem is located. When running a search in my db for adminloginurl, nothing is returned.

I’ve tried to fool around with $config[‘http_host’] only making me more confused.

My dev-store is located on a subfolder named /closed.

When changing my local.config for:

$config['http_host'] = '';
```<br />
and visiting my storefront, the page is redirected for the live-store domain,<br />
<br />
When visiting dev-store adminpage, I'm stuck in a redirect loop looking something like this:<br />
[url=""]http://www.sengeexpe...ed/adminurl.php[/url]<br />
<br />
Next up i tried altering my local.config file like this:<br />
<br />
$config['http_host'] = '';<br />
$config['http_path'] = '/closed';
```<br />
- even if it didn't make a lot of sense, since the installation is running on, the storefront is now staying at the same domain name.<br />
BUT - when entering dev-store admin page, and log-in, i get redirected to the login-page once again.<br />
<br />
If anyone can bring some light to this problem, or even give me a hint where to start looking, it would be deeply appreciated - this is really grinding my gears.<br />
<br />
Jesper.<br />
<br />
***** Update *****<br />
<br />
I emptied the row named [b]cscart_stored_session [/b]and when running with local.config-configuration:<br />
<br />
$config['http_host'] = '';<br />
$config['http_path'] = '/closed';
```<br />
I am now able to log-in to my backend. My SEO-addon is a wreck, but at least I can log-in <img src="upload://rA9Qa8gnUPZzRZRdI8kt3dpjkrs.png" class="bbc_emoticon" alt=":)"><br />
<br />
I will be updating this article as soon, everything is working!

Yep, forgot about the stored sessions table, if anybody else comes across this irritating admin login URL redirection, a quick and easy way to get in is by using the non-SEO URL:-

After beating my head against the wall over this for several hours. The answer was staring at me the whole time.

After changing the :

$config['http_host'] = '';


$config['https_host'] = '';

Make sure you change the path as well:

// Names of index files for the frontend and backend

$config['customer_index'] = '/dev/index.php';

$config['admin_index'] = '/dev/secretadmin.php';

That fixed it for me - Ver 4.01

You shouldn't have to put the path in the index indicies. You should only have ot make $config['http_path'] = '/dev';

Should someone stumble upon this topic, I discovered a solution, inspired by the suggestions here, that may work for you.

As with the original poster, I copied my site files and database from a development server to a production server and ran into the infinite admin redirect loop issue.

For me it was a cache issue but removing the files from var/cache did not fix the issue. Instead, in config.local.php, I changed the line

$config['cache_backend'] = 'file';


$config['cache_backend'] = 'database';

I then navigated to the admin page and logged on successfully.

Once logged in I changed the line back to 'file' (choose the cache method best for your application) and then clicked on Administration | Storage | Clear Cache.

Presumably this decoupled me from some leftover cache asset, allowing me to log in, then having restored the cache method and clearing the cache, returned things to the original state.

One last reminder - for myself as much as anyone else - next time, before copying your development instance over, try clearing the cache first.