Print Page | Close Window

Redirect Loop error with SEO files and IIS 7

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Search Engine Optimization
Forum Description: Talk about ways to optimize your ProductCart store for search engines
URL: https://forum.productcart.com/forum_posts.asp?TID=2731
Printed Date: 07-May-2024 at 7:45am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Redirect Loop error with SEO files and IIS 7
Posted By: BYRSC
Subject: Redirect Loop error with SEO files and IIS 7
Date Posted: 12-May-2009 at 3:09pm
I have installed the SEO files on one of my sites and I am getting the following Redirect Loop Error:

Redirect Loop

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

The browser has stopped trying to retrieve the requested item. The site is redirecting the request in a way that will never complete.

* Have you disabled or blocked cookies required by this site?
* NOTE: If accepting the site's cookies does not resolve the problem, it is likely a server configuration issue and not your computer.

I can get the custom 404 error page to work if I direct the link to the 404 error page I created, but when I try to forward the custom error page to the 404.asp in productcart for the SEO files, I get the above error.  I contacted Tech services with the people hosting this site and they said that the IIS7 is unable to process it and that's why I keep getting the error.  I have another site with this hosting company which the SEO files work fine on but they said that's because it uses IIS6. 

Has anyone heard or encountered this? 




Replies:
Posted By: ProductCart
Date Posted: 13-May-2009 at 2:54am
This is not a known issue. We have tested the SEO files with IIS 7. However, IIS 7 must be configured to support custom error messages.

Specifically:

- Open IIS 7
- Go to the Web site that you wish to edit
- Click on "Error Pages"
- Click on "Feature Settings" and select "Custom Error Pages" as shown below.



Now select the 404 error and click on Edit. Here is what the window that defines the custom error page should look like (here the "productcart" folder is in the root and renamed "mystore").






-------------
The ProductCart Team

Home of ProductCart http://www.productcart.com" rel="nofollow - shopping cart software


Posted By: BYRSC
Date Posted: 13-May-2009 at 8:20am
I have to use a Plesk control panel to make changes, and I have made this change.  I checked to make sure that the redirect would work by directly linking the custom 404 error page I made in the root directory and it worked just fine, but it just does not work when I point it to products/pc/404.asp like instructed.  I have been able to get it to work with two other sites, but I don't know what the hang up is on this one.


Posted By: Greg Dinger
Date Posted: 13-May-2009 at 9:26am
Originally posted by BYRSC BYRSC wrote:

I checked to make sure that the redirect would work by directly linking the custom 404 error page I made in the root directory and it worked just fine
 
That may be an insufficient test.  The 404 page may render, but there is an important distinction between "file path" and "URL".  If Plesk sets the 404 as a file path, the page may appear to work just fine, but it won't work for the SEO mod.
 
For example, IX web hosting's CP sets the 404 as a file path and the SEO mod WILL NOT WORK.  And don't get me started about their tech support dweebs.
 
So you have to ask your tech folks to look in IIS to see if the page is set as a "file path" or "URL".  If they can override it, have them do so.  If they cannot, consider another host.  This mod is too easy to implement and the hosting environment should not get in the way of it working.


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: BYRSC
Date Posted: 13-May-2009 at 10:11am
I am able to change it from a file to a url in the toolbar, so I put a custom 404 error page in products/pc/404-custom.asp and it works, so the url function for the error page is working.  Here is what the loop error looks like according to what IIS7 is calling for:

Here are the headers showing that the redirects are going on and on when the file 404.asp is not found itself!! http://blumaxtools.com/products/pc/404.asp GET /products/pc/404.asp HTTP/1.1 --> HTTP/1.x 302 Redirect Cache-Control: private Content-Type: text/html; charset=UTF-8 Location: http://blumaxtools.com/products/pc/404.asp Server: Microsoft-IIS/7.0 http://blumaxtools.com/products/pc/404.asp --> GET /products/pc/404.asp HTTP/1.1 Host: blumaxtools.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8) Gecko/2009032711 Ubuntu/8.10 (intrepid) Firefox/3.0.8

It looks like the 404.asp is not forwarding to 404b.asp for some reason.  There have not been any changes to the 404.asp page.  It just does not make sense.


Posted By: ProductCart
Date Posted: 13-May-2009 at 10:31am
If 404.asp is the custom error handler, there are by definition no scenarios in which the file is not found. 404.asp will always be found as it is the page used as the "404 Page Not Found" error handler. It will always be invoked when a page is not found.

404.asp then performs a server transfer to 404b.asp when the "not found" page is determined not to be a category page, content page, or product page.

The only scenario in which we can see a loop happen is if you entered 404.asp as the "Page Not Found" file in 404b.asp. In that case 404b.asp would redirect to 404.asp and create a loop.

404b.asp must instead contain the name of the file that is shown when the "not found" page is not a category page, content page, or product page. For example, something like: "/page_not_found.html"

So review 404b.asp and make sure that it has been configured properly.


-------------
The ProductCart Team

Home of ProductCart http://www.productcart.com" rel="nofollow - shopping cart software


Posted By: BYRSC
Date Posted: 13-May-2009 at 11:27am
Somehow it is the 404b.asp.  I did change the 404b.asp to go to Server.Transfer("/404-custom.asp") but it stays in the loop.  I made sure the page was found on the server by physically checking the link.  When I changed the path on the 404b.asp to Server.Transfer("/pc/404-custom.asp")  I received a 500 error code when trying to go to the products. This tells me somehow it has to be the 404b.asp, but I just don't know how?


Posted By: ProductCart
Date Posted: 13-May-2009 at 12:12pm
The only explanation for an error in that case is that it is performing a server transfer to a file that cannot be found. For example, if you do

Server.Transfer("/404-custom.asp")


... this assumes that "404-custom.asp" is in the root of the Web site. Not in the "pc" folder.

We recommend that you do the following:
(a) Create a simple HTML page. It can even be a completely empty file without any HTML code at all and just one line of text that says "Page Not Found".
(b) Call it "page_not_found.html" and place it in the root of the Web site, regardless of where the ProductCart-powered store is located in the web site directory tree.
(c) Then make sure that 404b.asp reads "/page_not_found.html".


-------------
The ProductCart Team

Home of ProductCart http://www.productcart.com" rel="nofollow - shopping cart software


Posted By: BYRSC
Date Posted: 13-May-2009 at 12:48pm
I put it in just as you said and it's the same thing.  Below is the link to page_not_found.html and to the viewcategories page which if you click on a category, it goes into the loop.

http://www.blumaxtools.com/page_not_found.html


http://www.blumaxtools.com/products/pc/viewcategories.asp


Posted By: ProductCart
Date Posted: 13-May-2009 at 12:54pm
It sounds like it's redirecting to 404.asp, not executing 404.asp. There is a big difference between the two, as shown above in our screen shot at the beginning of this thread and as mentioned by Greg Dinger above.

-------------
The ProductCart Team

Home of ProductCart http://www.productcart.com" rel="nofollow - shopping cart software


Posted By: Greg Dinger
Date Posted: 13-May-2009 at 1:03pm
Originally posted by Greg Dinger Greg Dinger wrote:

So you have to ask your tech folks to look in IIS to see if the page is set as a "file path" or "URL".  If they can override it, have them do so.  If they cannot, consider another host.  This mod is too easy to implement and the hosting environment should not get in the way of it working.
 
 
If you have not done so, please do what I suggested earlier.  CALL tech support and ask the question:  Have them check the IIS setting and make sure it is a URL and not a FILE PATH.


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: BYRSC
Date Posted: 13-May-2009 at 1:59pm
I have taken the information you have given me and sent it to my web hosting site tech support. Hopefully they will be able to fix this now. 

Thank you for all your help.


Posted By: BYRSC
Date Posted: 14-May-2009 at 2:28pm
My hosting company has made the necessary adjustment and everything is now working properly.

Thank You again for all your help!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net