Forums / General Questions / .htaccess file with redirects affecting admin login in another folder

.htaccess file with redirects affecting admin login in another folder

Views: 2,152

Results 1 to 6 of 6
30 May 2011, 5:01 PM
#1
webmiss avatar

webmiss

Zen Follower

Join Date:
Feb 2006
Posts:
147
Plugin Contributions:
0

.htaccess file with redirects affecting admin login in another folder

Hi All,

I'm working on a site that is currently using an .htaccess file with 301 redirects for search engine optimization purposes in the main directory. This redirects old pages to new pages on the site.

I have installed the zencart into a separate folder. Unfortunately, what I have discovered is that I cannot login to the zencart admin since adding this .htaccess file.

Is there a way to keep the redirects from affecting the zencart admin folder and logging into it?

If anyone can give me some direction here and what code I should use in the .htaccess file to stop this from happening on the admin side, I'd really appreciate it.

webmiss

31 May 2011, 5:33 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: .htaccess file with redirects affecting admin login in another folder

How about posting what you currently are using in your .htaccess

and some actual paths to folders

Zen-Venom Get Bitten

31 May 2011, 2:01 PM
#3
webmiss avatar

webmiss

Zen Follower

Join Date:
Feb 2006
Posts:
147
Plugin Contributions:
0

Re: .htaccess file with redirects affecting admin login in another folder

Sorry about that. Should have added that info. The SEO company created the original file. I just added some links that needed to be redirected.

Here it is:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.911homeserviceexperts.com$
RewriteRule ^(.)$ http://www.911homeserviceexperts.com/$1 [R=301]
RewriteCond %{HTTP_USER_AGENT} libwww [NC,OR]
RewriteCond %{QUERY_STRING} ^(.
)=http [NC]
RewriteRule ^(.*)$ – [F,L]

redirect 301 /index.html http://www.911homeserviceexperts.com/index.php

redirect 301 /plumber/florida/coral-springs/index.html http://www.911homeserviceexperts.com/plumber/florida/coral-springs/index.php
redirect 301 /plumber/florida/dania-beach/index.html http://www.911homeserviceexperts.com/plumber/florida/dania-beach/index.php
redirect 301 /plumber/florida/davie/index.html http://www.911homeserviceexperts.com/plumber/florida/davie/index.php
redirect 301 /plumber/florida/miramar/index.html http://www.911homeserviceexperts.com/plumber/florida/miramar/index.php
redirect 301 /plumber/florida/pembroke-pines/index.html http://www.911homeserviceexperts.com/plumber/florida/pembroke-pines/index.php
redirect 301 /plumber/florida/weston/index.html http://www.911homeserviceexperts.com/plumber/florida/weston/index.php

redirect 301 /plumber/index.html http://www.911homeserviceexperts.com/plumber/index.php
redirect 301 /about-us.html http://www.911homeserviceexperts.com/about-us.php
redirect 301 /why-choose-us.html http://www.911homeserviceexperts.com/why-choose-us.php
redirect 301 /home-warranty-service-plans/index.html http://www.911homeserviceexperts.com/home-service-plans.php
redirect 301 /plumber/plumbing-glossary.html http://www.911homeserviceexperts.com/plumber/plumbing-glossary.php

redirect 301 /compare-and-save.html http://www.911homeserviceexperts.com/compare-and-save.php
redirect 301 /home-service-plan-benefits.html http://www.911homeserviceexperts.com/home-service-plan-benefits.php
redirect 301 /no-worry-guarantees.html http://www.911homeserviceexperts.com/no-worry-guarantees.php
redirect 301 /top-5-complaints.html http://www.911homeserviceexperts.com/top-5-complaints.php

redirect 301 /home-service-plans.html http://www.911homeserviceexperts.com/select-a-plan.php

31 May 2011, 5:45 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: .htaccess file with redirects affecting admin login in another folder

You ae forcing the www variant in that file

What is set as the domain in the 2 ZenCart configure.php files??

It should be with the www

Zen-Venom Get Bitten

31 May 2011, 8:34 PM
#5
webmiss avatar

webmiss

Zen Follower

Join Date:
Feb 2006
Posts:
147
Plugin Contributions:
0

Re: .htaccess file with redirects affecting admin login in another folder

Hi Kobra,

This zen cart was installed on godaddy using their installer. Client insisted on godaddy.com. Anyway, configure.php has the following on line 17 and 18:

define('HTTP_SERVER', 'http://911homeserviceexperts.com');
define('HTTPS_SERVER', 'https://911homeserviceexperts.com');

So, I should change the server in the define section to http://www.911homeserviceexperts.com and https://www.911homeserviceexperts.com respectively?

webmiss

31 May 2011, 8:54 PM
#6
webmiss avatar

webmiss

Zen Follower

Join Date:
Feb 2006
Posts:
147
Plugin Contributions:
0

Re: .htaccess file with redirects affecting admin login in another folder

I just did what you suggested without waiting for your reply and alas! all is well in zencart land. Thank you very much.

Now if only I could find a mod that allows recurring billing using paypal.......that's on my wish list.