Re: Chemo's Ultimate URL's
Here is how you can get 404 headers to be sent. This is from the archives, so I'll post it here.
Well first off the issue is really due to the fact that Zen Cart does not send 404 headers. If you turn SEO off or on a shop with it turned off, and you can go to index.php?main_page=gobbledeygook, you will get an HTTP 200 OK header (and most likely the index page). It's just that the issue is a bit more noticeable with SEO installed, but it exists in a plain vanilla Zen Cart install as well.
You can send 404 headers on invalid pages by doing this (for 1.3):
- Open file includes/init_includes/init_sanitize.php
- Find on line 105 or thereabout:
PHP Code:
if (!is_dir(DIR_WS_MODULES . 'pages/' . $_GET['main_page'])) {
- Add after:
PHP Code:
header('HTTP/1.1 404 Not Found');
That will give a 404 header to user agents (including search bots) on invalid pages.
Re: Chemo's Ultimate URL's
Quote:
Originally Posted by dreamscape
I still do support it....
I can assure you that it still is under development, albeit slow development. I've already done quite a bit of work on a new version, but remember I'm developing this in my spare time, and it is not the only thing I do in my spare time..
No need to explain dream. I just saw that the last version released on your site did not support 1.3x and was dated 2005. Then I saw DrByte's fix to support 1.3x in April. And since I have not observed anything posted regarding a mod roadmap or potential To Do list that is what was meant by "did not appear under development".
We are ALL working on projects, some paid and some pro bono/volunteer. And we all have to pick and choose where to prioritize our time, in writing code, supporting code, writing documentation, posting/responding on support forums, real work, family, real life... and pick and choose which projects we can work on without ensuring funding vs. projects that must be funded for certain or up front. Such is the challenge when working for yourself and running your own biz.
Keep up the good work,
Woody
Re: Chemo's Ultimate URL's
Quote:
Originally Posted by Woodymon
And since I have not observed anything posted regarding a mod roadmap or potential To Do list
There is somewhere, but it is buried in the archive I'm sure.
Re: Chemo's Ultimate URL's
Hi Dreamscape,
Its good to hear about your future plans as for this mod, and don't misunderstand my statement. My intent was not to criticize but merely point out that you don't actively support it as much as other authors do, which is perfectly fine in my opinion. We are all super-grateful for what you give and understand if you don't have time. I was just noting that it appears that your last post was made May 23rd concerning this mod.
Anyways, thanks for posting the 404 code snippet. I tried it before but it didn't seem to work, but I'll try again.
Thanks.
Quote:
Originally Posted by dreamscape
I still do support it. I'm not around much in community support thread here because I don't have much time for that; I did when I was still a student, but not anymore. However, this thread is for community support. I certainly still offer commercial support, and have even placed a support page on
the mod's mini-site to let people be aware of this since I don't participate in the community thread much anymore.
If there is little community support, there is nothing I can do about that; that task is up to the community if it so wishes to support itself. However,
I still do and always will support the mod until the day I publicly announce that I'm not supporting it anymore.
Re: Chemo's Ultimate URL's
Quote:
Originally Posted by voltage
but merely point out that you don't actively support it as much as other authors do
Yes I get you were just doing that; however, I do actively support it, and have never turned a support request down, which I wanted to make clear. And I also wanted to make clear that the point of this thread is not for people to come in and post support questions to me. If you want support from me, this thread is not the channel to use. This thread is for community members to support other community members if they so choose to. That's the whole idea of "community support" (except for it to work there has to be community members willing to volunteer time to support other members)
Re: Chemo's Ultimate URL's
Quote:
Originally Posted by DrByte
Is your Xampp set up to support mod_rewrite?
Did you set your base URL in the sample .htaccess provided in the mod?
How would I find out about the mod_rewrite and if it's supported or not?
Pete
Re: Chemo's Ultimate URL's
Quote:
Originally Posted by voltage
Anyways, thanks for posting the 404 code snippet. I tried it before but it didn't seem to work, but I'll try again.
That snippet's purpose is to send a 404 header to the client, not to serve up Apache's error 404 document. You can't do that for a non-existing Zen Cart page, because all Zen Cart urls are piped through the index.php front controller, which does exist.
As soon as a bot sees a 404 header, it will know the requested page does not exist. Bots do not care about the contents of the 404 error page. Zen Cart defaults to showing the index page when the requested Zen Cart page is not found. This is not a problem if you also send error 404 headers. It's only a problem if you don't give a 404 header.
If you want a human friendly error page, since the browser doesn't openly show us the headers, then in ZC 1.3, you can change your Page Check setting from On or true to "Page Not Found" which will serve up the page_not_found template. But be warned you need the 404 header too. Otherwise, it will still send a 200 OK header.
Again, the purpose of the snippet is to send a 404 header. That's the most important part of an error 404 response, the header. If you do not send a 404 header when a page does not exist, machines & bots will not view the page as a 404 error, even if it says "not found", but will see it as being a valid page.
Re: Chemo's Ultimate URL's
Never mind about the mod_rewrite I found how to turn it on.
Now I'm getting an error message like this:
Fatal error: Call to a member function Execute() on a non-object in C:\Program Files\xampp\htdocs\zencart 1.3\includes\classes\seo.install.php on line 154
Thanks,
Pete
Re: Chemo's Ultimate URL's
Dreamscape, Thanks for a very informative response. I greatly appreciate it.
Mike
Ultimate SEO not working with 1.3.02
I have had Ultimate SEO v.2.101 installed since I installed my 1.3.01 cart in 06.06. It has worked great. This morning I upgraded my cart to 1.3.02 and now, with the SEO enabled, my pages do not go to https when login is attempted. It stays in http.
I have had to disable Ult. SEO for the time being, but does anyone know a fix for this?
Thank you in advance,