Jump to content
spidometrs

[CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

Recommended Posts

hey there!!! I'm really new to osCommerce and I basically did every change to my store after a lot of time spent researching forums, posts, etc.

 

I instaled the Ultimate_SEO_URLSv22d_11 today and everything went fine until "Step #6 - Edit .htaccess file (in your catalog directory)".

I have a few questions that I really hope you can help me with:

 

".htaccess file (in your catalog directory)" - What does this mean? What "catalog directory" - I can only find "/admin", "/download", "/ext" etc. folders but no catalog one. I searched for the ".htaccess" file and I found it in the "/pub" folder so I tried to modify it there but I still get the "Error 404: NOT FOUND!

Your browser cannot find the document corresponding to the URL you typed in."

This is the content of my .htaccess file:

 

  Options +FollowSymLinks -Indexes

# Begin Ultimate SEO V2.2d 
Options +FollowSymLinks
RewriteEngine On 

 # RewriteBase instructions 
 # Change RewriteBase dependent on how your shop is accessed as below. 
 # http://www.lasmaquillhadas.es = RewriteBase /
 # http://www.lasmaquillhadas.es/catalog/ = RewriteBase /catalog/  
 # http://www.lasmaquillhadas.es/catalog/shop/ = RewriteBase /catalog/shop/ 

 # Change the following line using the instructions above  

RewriteBase /You have to change me/

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-by-(.*).html$ all-products.php?fl=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-au-(.*).html$ articles.php?authors_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-f-(.*).html$ faqdesk_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fc-(.*).html$ faqdesk_index.php?faqPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fri-(.*).html$ faqdesk_reviews_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fra-(.*).html$ faqdesk_reviews_article.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pm-([0-9]+).html$ info_pages.php?pages_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-n-(.*).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nc-(.*).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nri-(.*).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nra-(.*).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-po-([0-9]+).html$ pollbooth.php?pollid=$2&%{QUERY_STRING}
# End Ultimate SEO V2.2d

 

I can't go further that the index page. I can't add new products. I can't do anything now. Pleaseeee helpppppp!!!

 

My website is www.lasmaquillhadas.es .

 

Thank you so very much!

Edited by newlaurai

Share this post


Link to post
Share on other sites

hey there!!! I'm really new to osCommerce and I basically did every change to my store after a lot of time spent researching forums, posts, etc.

 

I instaled the Ultimate_SEO_URLSv22d_11 today and everything went fine until "Step #6 - Edit .htaccess file (in your catalog directory)".

I have a few questions that I really hope you can help me with:

 

".htaccess file (in your catalog directory)" - What does this mean? What "catalog directory" - I can only find "/admin", "/download", "/ext" etc. folders but no catalog one. I searched for the ".htaccess" file and I found it in the "/pub" folder so I tried to modify it there but I still get the "Error 404: NOT FOUND!

Your browser cannot find the document corresponding to the URL you typed in."

This is the content of my .htaccess file:

 

# http://www.lasmaquillhadas.es = RewriteBase /

# http://www.lasmaquillhadas.es/catalog/ = RewriteBase /catalog/

# http://www.lasmaquillhadas.es/catalog/shop/ = RewriteBase /catalog/shop/

 

# Change the following line using the instructions above

 

RewriteBase /You have to change me/

The "catalog" directory refers to your web-root directory. It is the directory that holds those other directories. If you don't have a .htaccess file in the root, then just create one and add the code provided by this contribution. The text in the above line that says "You have to change me" means you have to change it. From the instructions above it, for your shop it should be

RewriteBase /

Share this post


Link to post
Share on other sites

The "catalog" directory refers to your web-root directory. It is the directory that holds those other directories. If you don't have a .htaccess file in the root, then just create one and add the code provided by this contribution. The text in the above line that says "You have to change me" means you have to change it. From the instructions above it, for your shop it should be

RewriteBase /

 

 

Thankkk youuu for your reply!!

Share this post


Link to post
Share on other sites

Hi,

 

how would i replace one word in the URL with another?

 

I'm using str_replace to change a word in the category name in the categories box but the unchanged word is showing in the url.

 

I've tried adding this str_replace in seo.class.php but that doesnt work.

 

$link = str_replace('xxx', 'yyy', $link);

 

Any pointers much appreciated :)

 

Thanks

 

Dave

Share this post


Link to post
Share on other sites

After successfully installing ULTIMATE SEO URLs I keep getting this error when i try to upload an image to a category or product in the admin panel:

 

"Warning: include_once(includes/reset_seo_cache.php) [function.include-once]: failed to open stream: No such file or directory in /homepages/28/d322982994/htdocs/lasmaquillhadas/admin/categories.php on line 22

 

Warning: include_once() [function.include]: Failed opening 'includes/reset_seo_cache.php' for inclusion (include_path='.:/usr/lib/php5') in /homepages/28/d322982994/htdocs/lasmaquillhadas/admin/categories.php on line 22

 

Warning: Cannot modify header information - headers already sent by (output started at /homepages/28/d322982994/htdocs/lasmaquillhadas/admin/categories.php:22) in /homepages/28/d322982994/htdocs/lasmaquillhadas/admin/includes/functions/general.php on line 22"

 

If it helps on line 22:

if ( preg_match("/(insert|update|setflag)/i", $action) ) include_once('includes/reset_seo_cache.php');

 

What does this mean!? Buff!! I've been working on this since a few hours now so pleaseeee.. once again HELP!

Thank you!!

Edited by newlaurai

Share this post


Link to post
Share on other sites

Hi,

 

how would i replace one word in the URL with another?

 

I'm using str_replace to change a word in the category name in the categories box but the unchanged word is showing in the url.

 

I've tried adding this str_replace in seo.class.php but that doesnt work.

 

$link = str_replace('xxx', 'yyy', $link);

 

Any pointers much appreciated :)

 

Thanks

 

Dave

You can't. There is code in place to prevent that. You would need to change the product name to do that. Or, if you have Header Tags SEO installed, you can enable that option in Ultimate SEO settings and then change the name of the Header Tags title.

Share this post


Link to post
Share on other sites

After successfully installing ULTIMATE SEO URLs I keep getting this error when i try to upload an image to a category or product in the admin panel:

 

"Warning: include_once(includes/reset_seo_cache.php) [function.include-once]: failed to open stream: No such file or directory in /homepages/28/d322982994/htdocs/lasmaquillhadas/admin/categories.php on line 22

 

Warning: include_once() [function.include]: Failed opening 'includes/reset_seo_cache.php' for inclusion (include_path='.:/usr/lib/php5') in /homepages/28/d322982994/htdocs/lasmaquillhadas/admin/categories.php on line 22

 

Warning: Cannot modify header information - headers already sent by (output started at /homepages/28/d322982994/htdocs/lasmaquillhadas/admin/categories.php:22) in /homepages/28/d322982994/htdocs/lasmaquillhadas/admin/includes/functions/general.php on line 22"

 

If it helps on line 22:

if ( preg_match("/(insert|update|setflag)/i", $action) ) include_once('includes/reset_seo_cache.php');

 

What does this mean!? Buff!! I've been working on this since a few hours now so pleaseeee.. once again HELP!

Thank you!!

 

 

 

NEVER MIND!! THE WAY I FIXED IT WAS:

Open the file that gave me errors ("general.php")

--->

Went to line 22 "if ( preg_match("/(insert|update|setflag)/i", $action) ) include_once('includes/reset_seo_cache.php');"

and added in front of it "//" ----->"// if ( preg_match("/(insert|update|setflag)/i", $action) ) include_once('includes/reset_seo_cache.php');"

 

The errors dissapeared i can upload images and everything seems to work fine.. if any bug, i'll report it here :)

 

Thank youuuu!

Share this post


Link to post
Share on other sites

You can't. There is code in place to prevent that. You would need to change the product name to do that. Or, if you have Header Tags SEO installed, you can enable that option in Ultimate SEO settings and then change the name of the Header Tags title.

 

Thanks for the quick reply Jack,

 

Thats a shame, but I understand why. I'm not sure what version of SEO urls I Have installed, but it would be quite an old one. I assume the one your talking about is the one in your signature? I'll take a look at that and see how I get one.

 

Once again thanks for the quick reply :)

 

Dave

Share this post


Link to post
Share on other sites

I have installed Ultimate SEO URLs, but now I have run into an issue.

My website is www.recognizedesigns.com

 

Every time I click on a product, it gets redirected to the home page (index.php).

Anyone know how I can get this up and working? Thanks! :)

 

Im haveing same problem @ http://moja-beba.com/ducan/

 

can someone please help me :)

 

thanx

Share this post


Link to post
Share on other sites

Im haveing same problem @ http://moja-beba.com/ducan/

 

can someone please help me :)

It appears you have a template installed with the known bad code in it that causes a redirect. Search back through this thread for how to fix that.

Share this post


Link to post
Share on other sites

Hi there.

I've had this contrib working for some time now, both on my localhost and on my website http://www.glowsticksltd.co.nz

 

However, having recently installed Subversion my localhost directory structure has changed and I am now have trouble getting SEO URL's working again on the localhost.

 

My oscommerce catalog is found here:

http://localhost/glowsticks_nz/trunk

 

And so I am using the following RewriteBase:

RewriteBase /glowsticks_nz/trunk/

 

However, whenever I click a link within my store, ie (site links to): http://localhost/glowsticks_nz/trunk/super-foam-thunder-stick-p-72.html

I am actually directed to: http://localhost/glowsticks_nz/trunk/-p-72.html

 

Any ideas on where I am going wrong?

Edited by myztic_man

Share this post


Link to post
Share on other sites

Hi there.

I've had this contrib working for some time now, both on my localhost and on my website http://www.glowsticksltd.co.nz

 

However, having recently installed Subversion my localhost directory structure has changed and I am now have trouble getting SEO URL's working again on the localhost.

 

My oscommerce catalog is found here:

http://localhost/glowsticks_nz/trunk

 

And so I am using the following RewriteBase:

RewriteBase /glowsticks_nz/trunk/

 

However, whenever I click a link within my store, ie (site links to): http://localhost/glo...stick-p-72.html

I am actually directed to: http://localhost/glo...runk/-p-72.html

 

Any ideas on where I am going wrong?

 

This means that the redirect code in the version you are using is broken, which version are you using?

Share this post


Link to post
Share on other sites

Hi there.

I've had this contrib working for some time now, both on my localhost and on my website http://www.glowsticksltd.co.nz

 

However, having recently installed Subversion my localhost directory structure has changed and I am now have trouble getting SEO URL's working again on the localhost.

 

My oscommerce catalog is found here:

http://localhost/glowsticks_nz/trunk

 

And so I am using the following RewriteBase:

RewriteBase /glowsticks_nz/trunk/

 

However, whenever I click a link within my store, ie (site links to): http://localhost/glowsticks_nz/trunk/super-foam-thunder-stick-p-72.html

I am actually directed to: http://localhost/glowsticks_nz/trunk/-p-72.html

 

Any ideas on where I am going wrong?

 

Sorry, i'm an idiot.. my localhost database didn't have that product installed and it was linked from homepage manually.. everything is working ok!

Share this post


Link to post
Share on other sites

Sorry, i'm an idiot.. my localhost database didn't have that product installed and it was linked from homepage manually.. everything is working ok!

 

Well it is still broken, in that case you should have seen a 404 page and header.

Share this post


Link to post
Share on other sites

Thanks for the great contribution, everthing works. However, seems like the second page still not showing static HTML file URLs?

 

Here is what I'm having for second page:

 

http://test.com/ categorey-c-1.html?page=2&sort=products_sort_order

Edited by iecwillow

Share this post


Link to post
Share on other sites

Thanks for the great contribution, everthing works. However, seems like the second page still not showing static HTML file URLs?

 

Here is what I'm having for second page:

 

http://test.com/ categorey-c-1.html?page=2&sort=products_sort_order

If by "second page" you are referring to the page=2 in the url, that is how it should be. You should be sure to have a contribution installed that creates a canonical tag. There are a number of contributions that do that. I recommend Header Tags SEO.

Share this post


Link to post
Share on other sites

Jack

 

I have just noticed a spelling mistake. Me being picky now. In the seo configuration you have

 

Enable permormance checker?

 

Should it be performance


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

I have just noticed a spelling mistake. Me being picky now. In the seo configuration you have

 

Enable permormance checker?

 

Should it be performance

Thank you for mentioning it Steve. Such mistakes bother me too.

Share this post


Link to post
Share on other sites

Thanks Jack I did goof on the config file.

 

Thanks for your time.

Edited by matrix2223

Eric

 

Keep up on osCommerce changes and updates at

Github | Understand osCommerce a little further at OsCommerce Documentation | Copy and paste your error message in Google add "in osCommerce" at the end to get relevant answers to most issues.

Share this post


Link to post
Share on other sites

This contribution is working on my site in terms of making the product urls look good. however after about 2 weeks I have this warning on google webmaster about my sitemap:

 

URLs not followed

When we tested a sample of URLs from your Sitemap, we found that some URLs redirect to other locations. We recommend that your Sitemap contain URLs that point to the final destination (the redirect target) instead of redirecting to another URL.

 

This is exactly what the contribution does, it uses htaccess to redirect to a nicer link but I am questioning if it actually has a negative effect on SEO. Can anyone shed some light on this? Am I doing it wrong?

 

Should I be using the none seo urls in the sitemap?

Edited by sackling

Share this post


Link to post
Share on other sites

This contribution is working on my site in terms of making the product urls look good. however after about 2 weeks I have this warning on google webmaster about my sitemap:

 

URLs not followed

When we tested a sample of URLs from your Sitemap, we found that some URLs redirect to other locations. We recommend that your Sitemap contain URLs that point to the final destination (the redirect target) instead of redirecting to another URL.

 

This is exactly what the contribution does, it uses htaccess to redirect to a nicer link but I am questioning if it actually has a negative effect on SEO. Can anyone shed some light on this? Am I doing it wrong?

 

Should I be using the none seo urls in the sitemap?

You have to look at the url's in the error. That message usually means you are using www in one case but not in another, or something like that.

Share this post


Link to post
Share on other sites

You have to look at the url's in the error. That message usually means you are using www in one case but not in another, or something like that.

 

Here is the sitemap in question: http://bit.ly/fYaFRX (shortened so google doesnt pick this up sorry)

 

I just resubmitted that same file again but without the SEO Urls to see if it helps. I turned on SEO urls again though so it might still give the error even though the sitemap is showing the ID's in the url.

 

I don't see any missing www. I am pretty sure it is because the urls are redirecting via 301s?

Share this post


Link to post
Share on other sites

Here is the sitemap in question: http://bit.ly/fYaFRX (shortened so google doesnt pick this up sorry)

 

I just resubmitted that same file again but without the SEO Urls to see if it helps. I turned on SEO urls again though so it might still give the error even though the sitemap is showing the ID's in the url.

 

I don't see any missing www. I am pretty sure it is because the urls are redirecting via 301s?

No, you misunderstood. The problem, most likely, is that you have your site setup a certain way, say http://www.mysite.com, but you told google that it is named http://mysite.com so when they compare urls they don't match, thus the failure. In your google account, there is a section where it will tell you what the actuall failure is for. You need to find that. The url's redirecting in this contribution isn't the cause of the problem. This contribuion, in one form or another, is used by many, many sites, including my own and they don't have such problems with a google sitemap account (the ones I personally know of, which are quite a few). So concentrate on the error, not the contribution, and you will be able to fix it.

Share this post


Link to post
Share on other sites

Hi Jack,

 

Sorry to be a pain about this. I thought I had fixed the config file right but evidently I must have done something else. I am still getting the oscids appended to urls

 

On my mac where I did all the work it works like its supposed to but using 2 other pcs with multiple browsers it doesn't work

 

here is my two config files so you may look

 

<?php
 define('HTTP_SERVER', 'http://www.domain.com');
 define('HTTPS_SERVER', 'https://www.domain.com');
 define('ENABLE_SSL', true);
 define('HTTP_COOKIE_DOMAIN', 'www.domain.com');
 define('HTTPS_COOKIE_DOMAIN', 'https://www.domain.com');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/');
 define('DIR_WS_HTTP_CATALOG', '/');
 define('DIR_WS_HTTPS_CATALOG', '/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', '/home/user/public_html/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

<?php
 define('HTTP_SERVER', 'http://www.domain.com');
 define('HTTP_CATALOG_SERVER', 'http://www.domain.com');
 define('HTTPS_CATALOG_SERVER', 'http://www.domain.com');
 define('ENABLE_SSL_CATALOG', 'false');
 define('DIR_FS_DOCUMENT_ROOT', '/home/user/public_html/');
 define('DIR_WS_ADMIN', '/admin/');
 define('DIR_FS_ADMIN', '/home/user/public_html/admin/');
 define('DIR_WS_CATALOG', '/');
 define('DIR_FS_CATALOG', '/home/user/public_html/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
 define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
 define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
 define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

 

Like I mentioned earlier it works 100% correct on the test account but once I moved all files to there account this happened.

 

Its driving me crazy.

 

Thanks for your time and all of your help.


Eric

 

Keep up on osCommerce changes and updates at

Github | Understand osCommerce a little further at OsCommerce Documentation | Copy and paste your error message in Google add "in osCommerce" at the end to get relevant answers to most issues.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×