madness.. i have never seen that before in a browser window... it doesnt appear on my browser when viewing your site...
a FF addon you have of some sort?
Printable View
I have a few addons, but this was not an intentional addition - I just noticed it after using this CEON module.
Anyway I have the answer and it has nothing to do with Ceon URI Mapping (I think)
My canonical home page is indicated with the canonical tag as:
<link rel="canonical" href="http://www.teafromtaiwan.com" />
i.e. without the trailing back slash. But my home page is defaulting to http://www.teafromtaiwan.com/ with the back slash.
So I just have to figure out where these URI's are being generated and fix one of them.
Installed this add on and it's simply... PERFECT. The quality of this package is unbelievable.
HOWEVER... when I copy the store to a sandbox (that's how I apply add-ons, including this one, to an already working store), all the " SEO friendly" URIs still point to the operational store...
Is there a script or an SQL patch that can fix all URI automatically (or manually without going throuh EDIT for ALL products)?
Thanks,
Chris
Hi Chris,
Glad you like the software and thanks for the nice comments about the overall distribution! :)
Do you mean that you have a "sandbox" store in a subdirectory and that you're moving the store to the root directory want to apply all the URIs you've generated for the "sandboxed" store to the "real" store?
I'm afraid I'm not quite clear on what the exact problem you are having is.
Best weather we've had this year today so taking the weekend off. I'm afraid I may not be able to reply until Monday.. :)
All the best...
Conor
ceon
Hi,
It's definitely the output of an addon. I must look it up and install it myself - thanks for the [roundabout/unintentional] tip! :)
The latest version of Ceon URI Mapping will always output a canonical tag for the home page which is the server's name plus the value for DIR_WS_CATALOG.. without the slash at the end. So if you navigate to the homepage with the slash at the end the canonical URI will differ (the slash at the end being the difference).
This is NOT a problem! :)
However it's always nicer for the URIs to remain consistent. The way to fix this is to change whatever links there are to the home page which are using the slash at the end to links which don't have a slash at the end.
I'll be releasing version 3.6.0 of the module on Monday.. I think the final change I'll make to it is to have Zen Cart output the exact matching canonical URI for the home page anytime it generates links instead of linking to the home page with a slash at the end.
As I said, the current behaviour is not a problem, it's fine for the canonical URI for the home page to have no slash at the end while the actual URI does.. that's the whole pointof canonical URIs after all.. telling the browser that the two URIs are equivalent! So just ignore this for the minute and take some time off! :)
Got to go now.
Enjoy the rest of your weekend!
All the best...
Conor
ceon
No. The canonical URL for the root page of a site should include the trailing slash. That's defined in the HTTP specs.Quote:
The way to fix this is to change whatever links there are to the home page which are using the slash at the end to links which don't have a slash at the end.
To the best of my knowledge there isn't any automated tool to help with that so I solve the problem by doing what @DivaVocals suggested:
- I fire up phpMyAdmin and select the teststore database (left pane).
- Within the teststore database I select the zen_ceon_uri_mappings table
- Then, I select the Export tab, check 'Add DROP TABLE', Save as gzipped file and hit GO.
- I then use Emacs to replace, in one fell swoop, all occurrences of /store/ to /teststore/.
- Then I used gzip to create a .sql.gz file
- Within the teststore database I then select the Import tab
- Load the edited .sql.gz file and...
- Voila!
Does this answer your question? :smile:
Hi,
Actually, I've since realised that that's the only practical solution.. didn't know it was the official spec as well.. glad my thoughts have turned out to line up with those who wrote the specs in the first place! :)
Will have a new release out soon (today or tomorrow).
All the best..
Conor
ceon
Yes, you're obviously aware that asking for http://example.com/somepage.html will cause the browser to send a "GET /somepage.html HTTP/1.1" HTTP request to the server.
In the same way, asking for http://example.com/ will cause the browser to send a "GET / HTTP/1.1" HTTP request to the server; and that means the URL "http://example.com" without the trailing slash included is technically invalid, as the GET request for it would be blank: "GET HTTP/1.1".
In reality, the browser will usually still send the correct "GET / HTTP/1.1" request for this.
However, when the request is for "GET /folder HTTP/1.1" the server will send a 301 redirect response along with a note of the new URL at "http://example.com/folder/" so that the browser can make a new HTTP request for "GET /folder/ HTTP/1.1" with trailing slash included.