Zen Cart Logo
Forums / General Questions / HTACCESS Infinate Loop blocking upgrade - URGENT HELP NEEDED

HTACCESS Infinate Loop blocking upgrade - URGENT HELP NEEDED

Views: 939

Results 1 to 9 of 9
1 May 2015, 2:50 PM
#1
nigel_bywater avatar

nigel_bywater

New Zenner

Join Date:
May 2015
Posts:
4
Plugin Contributions:
0

HTACCESS Infinate Loop blocking upgrade - URGENT HELP NEEDED

Hi, newbie here. My client has version 1.3.8a running in a subdirectory (/zencart) but it now requires a new design which i have been brought in to do on the latest ZC version.

I've never worked with ZC and the previous designer just left it untouched for years. He has two identical .htaccess files - one in root and one in /zencart. When i install the latest ZC version in the new subfolder (/zencart2) and run the install i get an infinate loop preventing me from installing in that folder.

The htaccess contents are here:


AddHandler x-mapp-php4 .php

RewriteEngine On

RewriteCond %{HTTP_HOST} ^.THECLIENTSWEBSITE.co.uk$ [NC]
RewriteRule ^(.
)$ http://THECLIENTSWEBSITE.co.uk/zencart$1 [R=301,L]

AddType text/x-component .htc


can anyone help me get around this so i can run an install? Thanks guys.

1 May 2015, 3:54 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: HTACCESS Infinate Loop blocking upgrade - URGENT HELP NEEDED

Nigel Bywater:

Hi, newbie here. My client has version 1.3.8a running in a subdirectory (/zencart) but it now requires a new design which i have been brought in to do on the latest ZC version.

I've never worked with ZC and the previous designer just left it untouched for years. He has two identical .htaccess files - one in root and one in /zencart. When i install the latest ZC version in the new subfolder (/zencart2) and run the install i get an infinate loop preventing me from installing in that folder.

The htaccess contents are here:


AddHandler x-mapp-php4 .php

RewriteEngine On

RewriteCond %{HTTP_HOST} ^.THECLIENTSWEBSITE.co.uk$ [NC]
RewriteRule ^(.
)$ http://THECLIENTSWEBSITE.co.uk/zencart$1 [R=301,L]

AddType text/x-component .htc


can anyone help me get around this so i can run an install? Thanks guys.
Need to evaluate that the requested directory is not your new "temp" directory.

Besides this, the store should be just in the root directory instead of being seen by visitors as being in a sub-directory.

Additional rewrite rule needed:

RewriteCond %{REQUEST_URI} !^/zencart2 [NC]

Making your .htaccess:

AddHandler x-mapp-php4 .php

RewriteEngine On

RewriteCond %{HTTP_HOST} ^.*THECLIENTSWEBSITE.co.uk$ [NC]
RewriteCond %{REQUEST_URI} !^/zencart2 [NC]
RewriteRule ^(.*)$ http://THECLIENTSWEBSITE.co.uk/zencart$1 [R=301,L]

AddType text/x-component .htc
1 May 2015, 4:00 PM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: HTACCESS Infinate Loop blocking upgrade - URGENT HELP NEEDED

There are a number of ways to revise the .htaccess in the future if the store is not brought up one directory to be in the main directory. Even if it is not moved up, I would suggest an .htaccess rewrite to remove the sub-directory from the provided path and redirect sub-directory calls to the main directory. The difference in all of this is that there is the uri that visitors see and then there is the file directory structure.

Currently ZC is installed in some path leading up to public_html then in a subdirectory of zencart. So the customer sees on their browser sitename. com/zencart.

Ideally, the customer should only see sitename. com and be done with it.

This does not mean that the filestructure must change though, because if the pointer for sitename. com is such that it sends to that directory, then the customer wouldn't know that it is in a sub-directory of public_html. Problem is, and why the above suggestion, that previous customers (and search engines) know the site content as sitename. com/zencart. So need to have that modified as after the above "shift" that sub-directory won't exist from the internet side. So, that would be a reason to use an .htaccess redirect from sitename. com/zencart to sitename. com... (Keeping all following tokens.)

4 May 2015, 10:16 AM
#4
nigel_bywater avatar

nigel_bywater

New Zenner

Join Date:
May 2015
Posts:
4
Plugin Contributions:
0

Re: HTACCESS Infinate Loop blocking upgrade - URGENT HELP NEEDED

You have no idea how much you've just helped. This has been driving me insane and the other developers has been no help. My concern is the loss of SE links by moving it out of the subdirectory but i'll solve that. Thanks again mc12345678. I'll update this post if I have any issues I think.

4 May 2015, 1:40 PM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: HTACCESS Infinate Loop blocking upgrade - URGENT HELP NEEDED

Nigel Bywater:

You have no idea how much you've just helped. This has been driving me insane and the other developers has been no help. My concern is the loss of SE links by moving it out of the subdirectory but i'll solve that. Thanks again mc12345678. I'll update this post if I have any issues I think.

So a properly formatted redirect is less of an issue than a complete lack of the product(s) being found. It is understood that some things may move, and generally speaking a single redirect is not an issue (meaning one rule to move from a subdirectory to a parent or other directory.) If however, you end up with redirects on redirects then things become 1) more confusing and 2) potentially an issue for search engines and rankings. Get things working properly first, then begin planning your redirect.

But glad that at least can now get through the testing part of creating your development site.

5 May 2015, 11:56 AM
#6
nigel_bywater avatar

nigel_bywater

New Zenner

Join Date:
May 2015
Posts:
4
Plugin Contributions:
0

Re: HTACCESS Infinate Loop blocking upgrade - URGENT HELP NEEDED

mc12345678:

There are a number of ways to revise the .htaccess in the future if the store is not brought up one directory to be in the main directory. Even if it is not moved up, I would suggest an .htaccess rewrite to remove the sub-directory from the provided path and redirect sub-directory calls to the main directory. The difference in all of this is that there is the uri that visitors see and then there is the file directory structure.

Currently ZC is installed in some path leading up to public_html then in a subdirectory of zencart. So the customer sees on their browser sitename. com/zencart.

Ideally, the customer should only see sitename. com and be done with it.

This does not mean that the filestructure must change though, because if the pointer for sitename. com is such that it sends to that directory, then the customer wouldn't know that it is in a sub-directory of public_html. Problem is, and why the above suggestion, that previous customers (and search engines) know the site content as sitename. com/zencart. So need to have that modified as after the above "shift" that sub-directory won't exist from the internet side. So, that would be a reason to use an .htaccess redirect from sitename. com/zencart to sitename. com... (Keeping all following tokens.)

So this access ruse has enabled me to access the zencart2 subfolder to install but the php version is out of date. Now i can upgrade the version but do you know if the old ZC version 1.3.8 will run on php5 or will it crash the existing site?

5 May 2015, 12:05 PM
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: HTACCESS Infinate Loop blocking upgrade - URGENT HELP NEEDED

Nigel Bywater:

So this access ruse has enabled me to access the zencart2 subfolder to install but the php version is out of date. Now i can upgrade the version but do you know if the old ZC version 1.3.8 will run on php5 or will it crash the existing site?

See http://www.zen-cart.com/content.php?48
For compatibility information; however generally speaking 1.3.8 will not work on PHP 5.3 and above. ZC 1.5.4 should not be operated on PHP 5.2.x; however, if you look at the below link, there are ways to temporarily allow it to operate on PHP 5.2.x (preferably at least 5.2.17):
http://www.zen-cart.com/showthread.php?215694-Known-Bugs-%28and-fixes%29-with-v1-5-4

14 May 2015, 10:29 PM
#8
nigel_bywater avatar

nigel_bywater

New Zenner

Join Date:
May 2015
Posts:
4
Plugin Contributions:
0

Re: HTACCESS Infinate Loop blocking upgrade - URGENT HELP NEEDED

mc12345678:

See http://www.zen-cart.com/content.php?48
For compatibility information; however generally speaking 1.3.8 will not work on PHP 5.3 and above. ZC 1.5.4 should not be operated on PHP 5.2.x; however, if you look at the below link, there are ways to temporarily allow it to operate on PHP 5.2.x (preferably at least 5.2.17):
http://www.zen-cart.com/showthread.php?215694-Known-Bugs-%28and-fixes%29-with-v1-5-4

Are you able to help with the version update for a fee? I tried to PM you but your box is full.

14 May 2015, 10:56 PM
#9
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: HTACCESS Infinate Loop blocking upgrade - URGENT HELP NEEDED

Nigel Bywater:

Are you able to help with the version update for a fee? I tried to PM you but your box is full.

Responded via PM. :)