Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Custom .htaccess problems with existing html site while testing in subfolder

Custom .htaccess problems with existing html site while testing in subfolder

Views: 1,071

Results 1 to 2 of 2
24 May 2012, 5:42 PM
#1
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,016
Plugin Contributions:
2

Custom .htaccess problems with existing html site while testing in subfolder

I have an existing html site and am testing zc139h in a subfolder of that site, where access to the subfolder is password protected.

Problem is that Google has found the test site and is redirecting traffic to it, rather than to the existing site, which has the same GA code.

Q1. What do I need to do to prevent Google from indexing/re-indexing the test site in the subfolder?

Q2. Do I need to do anything to the respective htaccess files for the existing and test sites.

Thanks in advance.

24 May 2012, 5:55 PM
#2
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,016
Plugin Contributions:
2

Re: Custom .htaccess problems with existing html site while testing in subfolder

The htaccess for html site is

RewriteEngine on
# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName mysite.com
AuthUserFile /home/myname/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/myname/public_html/_vti_pvt/service.grp
RewriteCond %{HTTP_REFERER} !^http://mysite.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://mysite.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mysite.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mysite.com$      [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]

The htaccess for zc in subfolder

AuthType Basic
AuthName "subfolder"
AuthUserFile "/home/myname/.htpasswds/public_html/subfolder/passwd"
require valid-user