Totally Zenned
- Join Date:
- Jan 2006
- Posts:
- 1,556
- Plugin Contributions:
- 0
Post #101 by sph
EDIT: @Ksookma, and it looks like we might be using different versions of the Ultimate SEO htaccess. I'm assuming that mine is the latest.
Steve
prommart.com
Started by lhungil on 14 Aug 2012, 2:26 PM · Views: 430,652
Totally Zenned
EDIT: @Ksookma, and it looks like we might be using different versions of the Ultimate SEO htaccess. I'm assuming that mine is the latest.
Steve
prommart.com
Totally Zenned
ksookma:
But if you go to the url without the www the www does not auto add. It does add on to the path when you navigate around the site but if google attemps to go to the non www version it will still work and google will think its another page.
doh forgot about the initial request to the website.
The canonical should work to tell most search engines the two URLs are the same. At least Google's canonical information mentions you can use canonical links pointing to a different domain. The canonical and base head element used by most templates is pulled from "configure.php", so changing the settings in those files is very important.
That said I would still use the 301 (my live sites do). Just must make sure the settings in "configure.php" match what your .htaccess file does (avoiding unnecessary redirects).
SPH:
... .htaccess. I'm assuming that mine is the latest.Other than a few additions to handle items not specific to "Ultimate SEO URLs" I'd agree :)
Looking at SPH's example .htaccess, there are a couple of things I would like to mention. These may not apply to every installation, but are good things to keep in mind.
When Zen Cart is installed in the site root, you can safely remove the "ErrorDocument 404 /errors/notfound.html". In this case the only time an web server ErrorDocument would be used is if index.php cannot be found.
It would be better to move the placement of the forced prefix above the "Ultimate SEO URLs" / Zen Cart directives. This will ensure it is always checked before control is passed to Zen Cart (the [L] after a RewriteRule says, "Process this rule rule and do not apply any more rules").
Note: When Zen Cart not installed in the site root (for example in /shop/), any forced 301 to add a domain prefix, ErrorDocument, or other sitewide configuration should be added to either the server configuration file or a .htaccess file in the root directory.
The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker
Totally Zenned
Thanks for the tips. I moved my htaccess canonical redirect to the top and removed the error documents. For the longest time my zencart page not found/error didn't work, but it has been now for some time: http://www.prommart.com/x
The rest of the stuff...mod_expires and mod_deflate...I got from one of my Prestashop test carts, whose admin can really compress and optimize code. Don't know if it's actually helping, but gtmetrics speed test seems to like it.
Steve
prommart.com
New Zenner
I tried the patch and it did not fix the issue. So I reverted to original code, since turning off the "select muliple products" choice accomplished what I needed it to do. It adds a buy button underneath each product, but most do not buy more than one at a time anyway.
Totally Zenned
TheDrunkenBundt:
I tried the patch and it did not fix the issue. So I reverted to original code, since turning off the "select muliple products" choice accomplished what I needed it to do. It adds a buy button underneath each product, but most do not buy more than one at a time anyway.
I have "Display Multiple Products Qty Box Status and Set Button Location" set to "3" (display both) in my test environments and it is working under "Ultimate SEO URLs" 2.07 w/ patch and the newer .htaccess file posted here.
Are there any other settings related to the issue you experienced? I know you have a viable workaround, but if there is a problem, I would like to get it fixed so it does not impact anyone else :)
The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker
New Zenner
lhungil:
I have "Display Multiple Products Qty Box Status and Set Button Location" set to "3" (display both) in my test environments and it is working under "Ultimate SEO URLs" 2.07 w/ patch and the newer .htaccess file posted here.
Are there any other settings related to the issue you experienced? I know you have a viable workaround, but if there is a problem, I would like to get it fixed so it does not impact anyone else :)
I installed the beta htaccess file, configured it for "not using categories as directories". It worked for each type of "multiple products add to cart" css3 buttons and locations. You can see the correct response at: http://thedrunkenbundtcakery.com/big-bundt-cakes-c-1.html
Thank you again for your hard work.
The Drunken Bundt
Zen Follower
Forgive me if this has been answered already, I've been reading up the whole thread and do not recall seeing this mentioned.
It seems in the install package, there are two files:
under:
new_files_151\your_admin_folder\includes\languages\english\extra_definitions\seo.php
new_files_151_english\your_admin_folder\includes\languages\english\extra_definitions\seo.php
looks like they both get written to the same place. which one is the correct version?
the only difference I notice is the 1st one (the one in new_files_151) is missing the last line which is:
?>
not sure if that is needed to close the <?php statement in the first line...
thanks!
Live again! http://spritelygoods.com Rebuilt on ZC v 1.5.1 from 1.3.0.2
Totally Zenned
woodlandsprite:
... It seems in the install package, there are two files:
new_files_151\your_admin_folder\includes\languages\english\extra_definitions\seo.php
new_files_151_english\your_admin_folder\includes\languages\english\extra_definitions\seo.php
Whoops, that file was intended to only be in the "new_files_151_english" language folder. Thank You for letting me know!
The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker
Zen Follower
so...
I've installed, and it doesn't seem to have taken :( (nvm, see edit below)
I left all the settings as default.
I put the .htaccess file in the root for where my v151 installation is
wasn't exactly sure what to put for the relative web path for my catalogue, so I've tried /domainname.com/subdir (which are /spritelygoods.com
/zencartv151/) and I've also tried just the subdir as noted below in my .htaccess file... and no joy...
**EDITED:: Looks like it may have been because I had the cart in maintenance mode! Seems to work fine outside of maintenance mode :)
One more question - when I move this thing to the root of my domain, do I just use /domainname.com/ as the rewrite location??
Options +FollowSymLinks
RewriteEngine on
RewriteBase /zencartv151/
#RewriteRule ^(.)-c-([0-9_]+)/(.)-p-([0-9]+).html$ $3-p-$4.html?cPath=$2&%{QUERY_STRING} [R=301,L]
RewriteRule ^(.)-c-([0-9_]+)/(.)-p-([0-9]+).html$ index.php?main_page=product_info&products_id=$4&cpath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-p-([0-9]+).html$ index.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
#RewriteRule ^(.)-c-([0-9_]+).html$ index.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
#RewriteRule ^(.)-c-([0-9_]+)/$ $1-c-$2.html [R=301,L]
RewriteRule ^(.)-c-([0-9_]+)/?.html$ $1-c-$2/ [R=301,L]
RewriteRule ^(.)-c-([0-9_]+)$ %{REQUEST_URI}/ [R=301,L]
RewriteRule ^(.*)-c-([0-9_]+)/$ index.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-m-([0-9]+).html$ index.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-pi-([0-9]+).html$ index.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-pr-([0-9]+).html$ index.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-pri-([0-9]+).html$ index.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-ezp-([0-9]+).html$ index.php?main_page=page&id=$2&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*).html$ index.php?main_page=$1&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?main_page=page_not_found&%{QUERY_STRING} [L]
Live again! http://spritelygoods.com Rebuilt on ZC v 1.5.1 from 1.3.0.2
Totally Zenned
woodlandsprite:
... Looks like it may have been because I had the cart in maintenance mode! Seems to work fine outside of maintenance mode :)
Interesting, this is a new one to me - but I do know other people have reported problems with downloads and some other items when the site is in maintenance mode (and without this plugin installed) - so who knows? But gives us another good question to ask :)
woodlandsprite:
One more question - when I move this thing to the root of my domain, do I just use /domainname.com/ as the rewrite location??
Not a fan of testing website applications under different paths from the final path. You should be able to just change the path to your web relative path (top level - no directory - root - is just /). You will also need to make a number of changes to configuration files, possibly some Zen Cart settings, and any paths stored in the database.
On a side note, if you plan to deploy on "domainname.com", I would recommend using "www.domainname.com" instead. You can then safely use a 301 redirect from "domainname.com" to "www.domainname.com".
The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker
Zen Follower
thanks lhungil.
My original shop is sitting in the root directory right now - I've migrated shops from subdir to main domain before - if I remember right, the config files are what need to be updated - I've rebuilt 1.5.1 from scratch while upgrading my original database (as a new database - the original one is still tied to the original shop). Unfortunately my hand got forced as I received notice from my host that they were updating the PHP software version and that broke my original cart as it was on legacy 1.3.0.2 version of zencart.
I'll be testing things again once i make the migration.
I suspect asking why www .domainname.com and domainname.com are different is a tangent - i'll go see what google has to offer :) (I'm not a web developer by trade so I always presumed they were equivalent!)
Live again! http://spritelygoods.com Rebuilt on ZC v 1.5.1 from 1.3.0.2
New Zenner
I have an old zencart shop and I am working on a fresh and new installation. I am almost finished, but because of an other SEO plugin, the paths on my new site are different with the old one's. All the search results in Google will land on a page of my site that doesn't exists. I will upload a new xml sitemap to Google, but I'm wondering if I could get in trouble with my google rankings, because of all the new url's on my site. There are two major differences:
Two example paths:
Browsing to category's:
Old: http://www.pictogrammenwinkel.nl/brandbestrijding-bordjes-brandblusser-c-60_62_70
New: http://www.pictogrammenwinkel.nl/nieuw/bordjes-brandblusser-c-60_62_70/
Browing to a product:
Old: http://www.pictogrammenwinkel.nl/brandbestrijding-bordjes-brandblusser-c-60_62_70/brandblusser-bordje-p-300
New: http://www.pictogrammenwinkel.nl/nieuw/brandblusser-bordje-p-300.html
Can someone tell me if I could get in trouble with my Google rankings? If not, then there is no problem, because it seems the plugin is working good :)
If it's going to give me problems with my Google rankings, can I adjust the new SEO plugin, so it shows the same url's as the old one's.
Many thanks for helping out.
Totally Zenned
Kcm75:
... I'm wondering if I could get in trouble with my google rankings, because of all the new url's on my site. There are two major differences:
Two example paths:
Browsing to category's:
Old: "brandbestrijding-bordjes-brandblusser-c-60_62_70"
New: "bordjes-brandblusser-c-60_62_70/"Browing to a product:
Old: "brandbestrijding-bordjes-brandblusser-c-60_62_70/brandblusser-bordje-p-300"
New: "brandblusser-bordje-p-300.html"
Take a look at this post about the different modes built into "Ultimate SEO URLs". The new versions of "Ultimate SEO URLs" support the same features old versions did and includes support for newer features such as "Categories as Directories".
Kcm75:
Can someone tell me if I could get in trouble with my Google rankings? If not, then there is no problem, because it seems the plugin is working good :)
If it's going to give me problems with my Google rankings, can I adjust the new SEO plugin, so it shows the same url's as the old one's.
It looks like your templates have removed the "canonical" links. Once you have re-enabled canonical links - you should be okay. If you enable categories as directories this will take care of categories. For the product links you would want to add your old RewriteRule for products to the .htaccess file.
As Zen Cart 1.5 automatically adds a "canonical" link to your pages, SEs will not penalize for duplicate URLs. In theory "canonical" links tell the SEs: "My content is the same as this URL, and this is my preferred URL for you to show in your listings".
Alternatively to be on the safe side you could add some RewriteRules ending with [R=301,L] to redirect from the old URLs to the new ones. This would force 99% of SEs to find the new URL right away. If you have a strong understanding of how RewriteRules work - this is the route I would take.
The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker
Zen Follower
lhungil:
Take a look at this post about the different modes built into "Ultimate SEO URLs". The new versions of "Ultimate SEO URLs" support the same features old versions did and includes support for newer features such as "Categories as Directories".
Once you have re-enabled canonical links - you should be okay. If you enable categories as directories this will take care of categories
how do you do this in Zen cart 1.5
Once you have re-enabled canonical links - you should be okay. If you enable categories as directories this will take care of categories
Totally Zenned
timhersh:
how do you do this in Zen cart 1.5
"admin" -> "configuration" -> "Ultimate SEO".
timhersh:
Once you have re-enabled canonical links - you should be okay.
This is specific to Kcm75's setup, not necessarily yours. Your template is correctly adding the "canonical link".
If you enable categories as directories this will take care of categories.
Again, this is specific to Kcm75's setup. Enabling this setting will make the URLs generated by this plugin for categories look similar to Kcm75's old site. The .htaccess will automatically add the '/' to the end of the category URL in this mode.
The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker
Zen Follower
thank you
New Zenner
It looks like your templates have removed the "canonical" links. Once you have re-enabled canonical links - you should be okay
How can I re-enable the canonical links?
Totally Zenned
Kcm75:
How can I re-enable the canonical links?
There should be something similar to the following in "includes/templates/your_template_name/common/html_header.php":
<?php if (isset($canonicalLink) && $canonicalLink != '') { ?>
<link rel="canonical" href="<?php echo $canonicalLink; ?>" />
<?php } ?>
If someone removed (or did not include) these lines in your template, canonical links are not added to pages. Zen Cart comes with a default template you can look at for a working example if needed.
If someone disabled the canonical system, you will want to download Zen Cart from "www.zen-cart.com" and copy "includes/auto_loaders/config.canonical.php" and "includes/init_includes/init_canonical.php" into your Zen Cart installation.
If you are going the canonical route, and do not plan to modify the .htaccess with RewriteRules generating 301s, make sure you add any needed rules from the old URL Rewriter so website visitors can access your pages under either format (the old ones and the new ones).
The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker
New Zenner
I'm not sure with steps to take now. My new store which is now at the location pictogrammenwinkel.nl/nieuw/ has the both canonical files present and the canonical lines are present in the file "includes/templates/your_template_name/common/html_header.php". My old store doesn't have the canonical files and line.
First when just browsing the categories:
Old: "brandbestrijding-bordjes-brandblusser-c-60_62_70/"
New: "bordjes-brandblusser-c-60_62_70/" (Add category parent to begining of URLs?: true, Show categories as directories in the URL?: false)
New: "brandbestrijding-c-60/bordjes-c-60_62/brandblusser-c-60_62_70/" (Add category parent to begining of URLs?: true, Show categories as directories in the URL?: true)
With the settings "add category" to true and "show categories as directories" to false, it almost is the same as my old store. Except my old add-on stacks all the parent/sub directories into the link and the new add-on only takes the last 2 parent/sub directory. In my example there are there categories in the link.
Alternatively to be on the safe side you could add some RewriteRules ending with [R=301,L] to redirect from the old URLs to the new ones. This would force 99% of SEs to find the new URL right away. If you have a strong understanding of how RewriteRules work - this is the route I would take.
I understand some php, but I am not an expert and I do not understand how RewriteRules work. These lines are in my old store .htaccess file:BOF SSU
Options +FollowSymLinks -MultiViews
RewriteEngine OnMake sure to change "test_site" to the subfolder you install ZC. If you use root folder, change to: RewriteBase /
RewriteBase /
Deny access from .htaccess
RewriteRule ^.htaccess$ - [F]
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*) index.php?/$1 [E=VAR1:$1,QSA,L]EOF SSU
Totally Zenned
Kcm75:
My new store which is now at the location pictogrammenwinkel.nl/nieuw/ has the both canonical files present and the canonical lines are present in the file "includes/templates/your_template_name/common/html_header.php".
Looking at the HTML source for the new site, these are working correctly on the new store now. :)
Kcm75:
New: "bordjes-brandblusser-c-60_62_70/" (Add category parent to begining of URLs?: true, Show categories as directories in the URL?: false)
You need to change the .htaccess file by hand when you change change the option "Categories as Directories". The URL you provided shows you did not change the .htaccess file to comment / uncomment the required lines in the .htaccess file when changing this setting.
Failure to update the .htaccess file will cause your store to do extra redirects (which SEs do not like) and which can slow down your sites performance. The correct URL for the setting (Add category parent to begining of URLs?: true, Show categories as directories in the URL?: false) is: "/nieuw/bordjes-brandblusser-c-60_62_70.html"
The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker
Tell staff why this post should be reviewed.