Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

302 Moved temporarily


ChrisW123

Recommended Posts

Posted

I'm bored so I'm looking at my website logs, and at the very bottom of the graphs and charts I noticed this section. It shows over 3000 requests that caused a "302" error:

 

HTTP Status codes

302 Moved temporarily (redirect)    3019   94.7%  176.39 KB 
404 Document Not Found                77    2.4%   38.35 KB 
403 Forbidden                         48    1.5%   27.47 KB 
401 Unauthorized                      36    1.1%   21.02 KB 
301 Moved permanently (redirect)       5    0.1%    1.58 KB 
206 Partial Content                    2      0%    7.38 KB

 

Is this a normal amount? What would cause this? As far as I know I don't have any redirects except I guess when a customer tries to checkout, etc. and not logged in. Would this be the cause?

 

Is this a high number or a normal number? So far this month I have about 74000 "hits" if that matters or has a bearing on the 302 error figures. I'm not sure if the Status Code chart is for this month or for all time.

Posted

One common cause of this is when you have a link to something like http://mywebhost.com/link and the web server wants it to be http://mywebhsot.com/link/ (note the trailing slash) for some reason. I'm not exactly sure why, but I've seen Apache do this many times.

 

You can use a link checker like Xenu (there are others) to follow links in your site and give a detailed report back with any errors, including 302s.

 

-jared

Posted

Good idea Jarid, to use a link checker.

 

I searched Google for "xenu" and found a site with a download to check your site. But it's funny, they say:

 

"You will personally check the software for viruses before starting it (I do the same with software I download with Norton AntiVirus)"

 

So they don't even know if the software they have on their own website has a virus or not? LOL. Have you used this software?

Posted

Well most of the link scan websites show that there are no problems with my site, but find that trying to access a page that requires a logged in user who isn't, would cause it. So I guess that's normal.

 

But I did find this great tool: http://www.elsop.com/quick/

 

This one seems to do more tests and points out ALL syntax errors in your code. I never realized how many bugs I have in my code. Even tho everything appears to work in the browser, I guess there are still problems. I've fixed most of them, but there are others like this:

 

00117 unknown attribute "/" for element <input>.

00117 unknown attribute "BORDER" for element <input>.

00117 unknown attribute "ALT" for element <input>.

 

These are hard to find (and thus fix). I wonder if these problems will cause problems with browsers or search engines. My site seems to work fine with the "big three" browsers. But will search engines give up if they find errors like these? If so, I'd want to fix them.

Posted

Yes, I've used it - - never had a virus problem, but I think that they're saying that you should always virus scan things that you download.

 

As far as finding the syntax problems, I'd suggest using the w3.org validator at validator.w3.org. It will give you a better idea where the errors are coming from.

 

It will give you line numbers, but those line numbers are for the HTML that it sees, not the PHP in your files. It can be a bit of a chore to find them all, but it's possible.

 

-jared

Posted
As far as finding the syntax problems, I'd suggest using the w3.org validator at validator.w3.org.  It will give you a better idea where the errors are coming from.

 

It will give you line numbers, but those line numbers are for the HTML that it sees, not the PHP in your files.  It can be a bit of a chore to find them all, but it's possible.

-jared

 

Yeah I know what you mean, the tool I posted also gives line numbers but only of the HTML, not the php code, so they are all but useless. Never-the-less I've been able to fix a bunch of logic errors which were causing problems. :) It's really time consuming to however. I just finished product_info.php which took forever because of all the IF statements and WHILE loops you have to keep track of. LOL.

 

Do you know if the other errors will cause problems with SEO? Errors like:

 

00022 unknown attribute "MARGINWIDTH" for element <body>.

00022 unknown attribute "MARGINHEIGHT" for element <body>.

00137 unknown attribute "BORDER" for element <input>.

00137 unknown attribute "ALT" for element <input>.

 

These appear to be valid even though this tool reports them as problems, because they are used all over the place. I don't want to remove them. So maybe this tool is using a stricter syntax, and these really aren't a problem???

Posted

Thanks for the link.

 

Regarding Xenu, I guess Tilman (the programmer) is just a bit concerned about people not checking what they download. I had to smile a little, too, I must admit.

 

But it's still a very good tool, and I also use it :-)

 

Happy New Year!

M.

I don't want to set the world on fire—I just want to start a flame in your heart.

 

osCommerce Contributions:

Class cc_show() v1.0 – Show Credit Cards, Gateways

More Product Weight v1.0

Posted

Phew! Just did a quick queck using the W3 Validator... Now THAT will be something to fix up all the table stuff and 'nobr' and € and & stuff — didn't suspect the MS2 code to be THAT 'unclean'...

I don't want to set the world on fire—I just want to start a flame in your heart.

 

osCommerce Contributions:

Class cc_show() v1.0 – Show Credit Cards, Gateways

More Product Weight v1.0

Posted

@Chris:

 

All robot code I've seen usually just disregards all that 'visual' stuff like extra browser-specific entities and the like. Some MIGHT use the 'alt', though ;-)

 

What I'm more concerned with is the table fixups... seems some TD's and TR's get mixed up... and I always wondered why my Opera sometimes 'jumped' the layout around on my osC... apparently the only browser that can 'see' the problems.

I don't want to set the world on fire—I just want to start a flame in your heart.

 

osCommerce Contributions:

Class cc_show() v1.0 – Show Credit Cards, Gateways

More Product Weight v1.0

Posted
What I'm more concerned with is the table fixups... seems some TD's and TR's get mixed up... and I always wondered why my Opera sometimes 'jumped' the layout around on my osC... apparently the only browser that can 'see' the problems.

 

I was also more concerned with the TD's and TR's out of place, probably mostly due to mistakes I've made adding contributions. :) So I think I've fixed most of them. I'll probably check ALL the pages tomorrow to make sure I haven't missed anything.

 

HAPPY NEW YEAR! Only 6 hours to go until 2005 here on the West Coast (USA).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...