Admin redirecting

Hello all!



Have a bit of an issue. I have moved my old site to a sub domain and I still need to use the admin section on the old site. The problem is when I try to access the admin section it redirects to my live site. I have looked at all files and I don’t see any redirects for the admin panel to go to the live site.



Example

going to - www.dev.site.com/admin.php redirects to www.site.com

I believe this is due to the admin panel was checked as " Enable secure connection in the administration panel" Is there a file that I can edit to make the admin panel non secure?

You probably had an error in your config.local.php file related to one of the ‘config’ parameters.

Either disable SEO or edit the root .htaccess…


Rewrite_base /dev

Is there a way to disable https for admin side without going into the cart and unchecking Enable secure connection in the administration panel (SSL certificate is required to be installed on your server) ?

Where does SEO come into this?



@sh1nn3r - Yes, but you have to modify the database through phpMyAdmin or similar DB admin application. It iwll be in your ‘settings’ table. Search for a setting with a ‘name’ of ‘%http%’ (without the quotes). You should see it from there.



You should have an .htaccess file in both your old and new store root directories as well as separate config.local.php files.



But I will still bet you have a problem in your config.local.php file where you should be using a ‘path’ of

[quote name=‘tbirnseth’]Where does SEO come into this?[/QUOTE]



Because if he/she has SEO enabled in /dev site and the .htaccess is still reading the rewrite base is the root, then it will redirect to the root as per his/her example.

Hmm, but there’s no rewrite in domain.com/admin.php or in domain.com/dev/admin.php



Seems to me if he’s accessing domain.com/dev/admin.php and is getting domain.com/admin.php then he does not have the ‘http_path’ and/or ‘https_path’ elements set to ‘/dev’.



yes, he will need an .thaccess in his /dev directory with the RewriteBase = /dev for rewrite actions, but this shouldn’t even be coming into play here.



Of course, I could be all wet. The Apache rewrite seems to do things that I many times don’t expect. I am by no means an Apache expert and struggle everytime I have to go into that world…

[quote name=‘tbirnseth’]Hmm, but there’s no rewrite in domain.com/admin.php or in domain.com/dev/admin.php



Seems to me if he’s accessing domain.com/dev/admin.php and is getting domain.com/admin.php then he does not have the ‘http_path’ and/or ‘https_path’ elements set to ‘/dev’.



yes, he will need an .thaccess in his /dev directory with the RewriteBase = /dev for rewrite actions, but this shouldn’t even be coming into play here.[/quote]



Sounds like both



s/he/it running www or not in config.local.php

.htaccess has rewrite base set incorrectly if the folder doesn’t exist in site_root


```php

So “RewriteBase” should be:

RewriteBase /store/cart

RewriteBase / ```

Site redirects fine to the development site. The only problem is I can’t access my admin panel. I see it load up behind https then automatically redirects to main site. I do not see anything in the config local or htacess redirecting back to the main site.

[quote name=‘sh1nn3r’]Site redirects fine to the development site. The only problem is I can’t access my admin panel. I see it load up behind https then automatically redirects to main site. I do not see anything in the config local or htacess redirecting back to the main site.[/QUOTE]



Like The-Tool Said , disable SEO and you will be able to access the old admin panel otherwise it will redirect to the new Rewrite base and I don’t think having 2 .htaccess files will solve the problem, it is just how SEO works in CS-Cart as far as I can tell, but I could be wrong.

This shouldn’t even get to the rewrite rules because the rewrite condition will not be met.



Your dev site should not even know about your main site if your config.local.php is setup correctly.



That’s the best info I can give without actually looking. You might post your config values from config.local.php (not your DB info).