Jump to content
Chemo

[Contribution] Ultimate SEO URLs - by Chemo

Recommended Posts

I am proud to announce the release of Ultimate SEO URLs for osCommerce-MS2.

 

This contribution builds on the cName & pName code to give an even more flexible, search engine friendly, and cross server compatible SEO URLs.

 

Once installed, Ultimate SEO URLs will give the store owner the choice of the v1.X style cName or new v2.X style static HTML file. This setting is incorporated into the admin control panel so can be toggled on, off, cName, or Rewrite at will.

 

This contribution will work for any store on any server. It is compatible with not only *NIX based servers but also Windows/IIS servers (although IIS is limited to cName).

 

In addition, this contribution is compatible with all other contributions by me including Page Cache (directions included in install package).

 

This release supports multiple languages, unlimited nested categories, and duplicates with ease.

 

SCREENSHOTS

Admin Control Panel Settings -

admin.gif

Product Name v1.X -

pname.gif

Product Name v2.X -

v2_speed2.gif

Category Name v1.X -

cname.gif

Category Name v2.x -

v2_hardware_cdroms.gif

 

Download Ultimate SEO URLs for osCommerce-MS2.

 

Enjoy!

 

Bobby

Share this post


Link to post
Share on other sites

I forgot:

 

THIS IS NOT COMPATIBLE WITH THE STOCK OSCOMMERCE SEF URL'S OPTION!

 

Be sure to turn it off...

 

Bobby

Share this post


Link to post
Share on other sites

Just a note.

 

I have been messing around with cName and pName contrib. for the last few days. Great stuff. But, just not quite what we were looking for. I have downloaded this one and I'm off and running again. :D

 

Can't wait.

 

Paul

Share this post


Link to post
Share on other sites

If you have any issues be sure to post:

 

Server info (Apache on *NIX machine, etc)

Exact problem

What you've tried to solve it

...and any debuggin you've done

 

When you get done with the install come back and give me some feedback on the install and functionality. I'm particularly interested in making this as easy to install as possible.

 

Bobby

Share this post


Link to post
Share on other sites

Bobby,

 

I like it. :D

 

I went through the install on a fresh install of OSC (oscommerce-2.2ms2) with only 'operator malfunctions' ;) Having corrected my ooopsses from overexcitement, it is definately up and running. And I am liking it.

 

I am curious why in this url ( <sitename>/osc222/hardware-keyboards-c-1_8.html ), you include both the name of the category and the category id c-1_8 ? Is the id necessary to determine whether you are showing a category or a product? Just a bit curious.

 

Some things that came to mind during the install.

 

On Step 7, everything worked great. And there were a number of "Success"'s on the screen. I wasn't sure if everything was done. Would be nice to have a "The Install process is Finished" when all is said and done. :D At least for us old and slow ones. ;)

 

Also, I got a bit confused as to where to change the Version type. I did finally find that in the Admin configuration setting Step 8. But you name it Choose URL type there. Not really a problem. And I may be the only one that it would confuse.

 

Having said all that. I would like to commend you once again. Well done.

 

And thanks. I will now try it on a 'live' site. If I manage that alright I will post the URL.

 

Paul

 

PS. One more thing.

Would it be possible to put the category name in front of the product name? Like /osc222/category-name/hardware-keyboards.html ?

Edited by Fourbit

Share this post


Link to post
Share on other sites
...

I am curious why in this url ( <sitename>/osc222/hardware-keyboards-c-1_8.html ), you include both the name of the category and the category id c-1_8 ? Is the id necessary to determine whether you are showing a category or a product? Just a bit curious.

I coded it to be compatible, fast, and extremely easy on the server (using mod_rewrite). I put that in there for speed and simplicity. To be honest, you can put anything you want in front of the -c-1_8.html and it'll still resolve. The actual product name is not important...it's the -c-1_8 that sets the cPath.

...

On Step 7, everything worked great. And there were a number of "Success"'s on the screen. I wasn't sure if everything was done. Would be nice to have a "The Install process is Finished" when all is said and done. :D At least for us old and slow ones. ;)

I'll put that in the next release...but, overall was the script easier to use than something you would normally had to execute in phpMyAdmin?

Also, I got a bit confused as to where to change the Version type. I did finally find that in the Admin configuration setting Step 8. But you name it Choose URL type there. Not really a problem. And I may be the only one that it would confuse.

I'll make it more clear in the next release...

PS. One more thing.

Would it be possible to put the category name in front of the product name? Like /osc222/category-name/hardware-keyboards.html ?

You can put anything you want in there before the -c-XXX.html as that is the important part. You could use /pink-bunnies-are-cute-c-1_8.html and it will pull up the same page. That's the flexibility of the contribution...you can modify it easily to fit your tasts :)

 

Let me know how it goes on your live server! To my knowledge, you are the first one to install it and I consider your feedback extremely positive. Thank you!

 

Bobby

Share this post


Link to post
Share on other sites

EXCELLENT!!!

 

I'm two for two. That says it all. :D If I can do it, well, then,,......

 

.but, overall was the script easier to use than something you would normally had to execute in phpMyAdmin?

 

Yes, most definately. That is a GREAT feature. I don't have trouble with using phpMyAdmin. But, I have seen so many that don't even know how it is used. So I see an extreme advantage to the Install feature.

 

I will be looking at the code closer tomorrow to see how to change things. I'm sure that the owner of the site will want to change some things. ;)

 

Off to play some more. :thumbsup:

Edited by Johnson

Share this post


Link to post
Share on other sites

Great contribution!

It's all OK!

Edited by Johnson

Skype: centoasa

Skype: remigioruberto

Share this post


Link to post
Share on other sites

Don't work for me, try it local (xampp) and my shop.

 

When I put in the .htccass I got a error.

 

So help me, I'm not a expert.

 

Thanks,

Panzz

Share this post


Link to post
Share on other sites

I'm still seeing on who's online panel some bots indexing my page as: /product_info.php?products_id=183

 

why this?


Skype: centoasa

Skype: remigioruberto

Share this post


Link to post
Share on other sites
Great contribution!

It's all OK!

If I get the thumbs up from 100asa it must be coded well! :)

Don't work for me, try it local (xampp) and my shop.

 

When I put in the .htccass I got a error.

 

So help me, I'm not a expert.

 

Thanks,

Panzz

You have an extremely customized install...it'll take some serious debugging but is not impossible. Contact me on AIM and I'll work with you one on one. The majority of what will have to be done is simple but only applies to your installation. I don't want to clutter the support thread...let's solve the problem and post what it was and how we solved it instead of going back and forth with posts.

I'm still seeing on who's online panel some bots indexing my page as: /product_info.php?products_id=183

 

why this?

That is because the spiders have the products_id URL indexed. Don't worrry...all your old URL's still work and they are not getting 404 errorss :) Over time the spiders will pick up the new URL's and drop the old ones.

 

Bobby

Edited by Johnson

Share this post


Link to post
Share on other sites

Hey Chemo,

 

Awsome! I had been using your 1st cname contrib, but thought I should try this one..simply awsome!

 

I liked the note about the most common problem being editing the wrong htaccess file...ummm how did you know I was gonna do that!!! LOL

 

Anyway..went very easy, and just empting the caches showed the results.

 

I do have one question. I went ahead and enabled the default cache option in osc (under admin)..(I have it set to use the same cache file that I use for category-trees, and config-cache..which is located outside of the web root). Now for some reason the category tree doesn't show, but the original cat. menu does. any ideas?

 

RW

 

EXCELLENT!!!

 

I'm two for two. That says it all. :D If I can do it, well, then,,......

Yes, most definately. That is a GREAT feature. I don't have trouble with using phpMyAdmin. But, I have seen so many that don't even know how it is used. So I see an extreme advantage to the Install feature.

 

I will be looking at the code closer tomorrow to see how to change things. I'm sure that the owner of the site will want to change some things. ;)

 

Off to play some more.? :thumbsup:

Edited by Johnson

A man who works with his hands is a laborer

A man who works with his hands and his brain is a craftsman

But a man who works with his hands and his brain and his heart is an artist. - Charles Dickens

Share this post


Link to post
Share on other sites

I've been see last adding to Chemo contribution by Webpixie, but I don't see the difference in instruction.

Please, Webpixie, more clear!


Skype: centoasa

Skype: remigioruberto

Share this post


Link to post
Share on other sites

Hi

 

When i click to install, i get a 404 error.

 

I have all sorts of other errors showing on my webpage too.

 

Warning: fopen(SEO_URLS_CACHE_DIRseo_english.cache): failed to open stream: Permission denied in /home/iimdfjwt/public_html/includes/seo_cache.php on line 199

 

Warning: fwrite(): supplied argument is not a valid stream resource in /home/iimdfjwt/public_html/includes/seo_cache.php on line 200

 

Warning: fclose(): supplied argument is not a valid stream resource in /home/iimdfjwt/public_html/includes/seo_cache.php on line 201

 

Warning: main(SEO_URLS_CACHE_DIRseo_english.cache): failed to open stream: No such file or directory in /home/iimdfjwt/public_html/includes/seo_cache.php on line 204

 

Warning: main(): Failed opening 'SEO_URLS_CACHE_DIRseo_english.cache' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/iimdfjwt/public_html/includes/seo_cache.php on line 204

 

Help!!!!!! :'(


Regards

Paul

Share this post


Link to post
Share on other sites

I used your CName PName Contribution a few days ago without any probs.

 

I found the install easy to follow, and have been following the upgrade instructions.

 

The CName PName option still works fine, but when I use the static html option, I get a 404 Error page for each category, even though it looks like the New URL would be correct according to your naming protocol. (I think the rewrite is working).

 

Your help would be appreciated.

 

The site is not yet live. The host is Linux and Apache

 

URL: http://www.baby-bean.com/catalog/

 

gets you to the catalog page, and I will leave it in the non functioning position

 

Regards

Share this post


Link to post
Share on other sites
Hi

 

When i click to install, i get a 404 error.

 

I have all sorts of other errors showing on my webpage too.

 

Warning: fopen(SEO_URLS_CACHE_DIRseo_english.cache): failed to open stream: Permission denied in /home/iimdfjwt/public_html/includes/seo_cache.php on line 199

...

Warning: main(SEO_URLS_CACHE_DIRseo_english.cache): failed to open stream: No such file or directory in /home/iimdfjwt/public_html/includes/seo_cache.php on line 204

...

Help!!!!!! :'(

You need to run the install script and then configure it from the newly installed admin control panel settings! Notice how SEO_URLS_CACHE_DIR is not being converted to its cooresponding value? That's because most likely it is not defined...which means it's not installed.

 

Run the install script, then configure. Make sure it is the FULL filesystem path beginning with a forward slash and ending with a slash!!

I used your CName PName Contribution a few days ago without any probs.

 

I found the install easy to follow, and have been following the upgrade instructions.

 

The CName PName option still works fine, but when I use the static html option, I get a 404 Error page for each category, even though it looks like the New URL would be correct according to your naming protocol. (I think the rewrite is working).

 

Your help would be appreciated.

 

The site is not yet live. The host is Linux and Apache

 

URL: http://www.baby-bean.com/catalog/

 

gets you to the catalog page, and I will leave it in the non functioning position

 

Regards

Make sure that you performed the step that adds code to the .htaccess file!

 

Bobby

Share this post


Link to post
Share on other sites

Bean boy,

 

Make sure you have changed the part in the .htaccess file where it says /folder/ to /(your store folder)/ which appears to be 'catalog'.

 

# Change "folder" to your catalog directory name

RewriteBase /catalog/

 

 

Paul

 

How do I know? :-"

Edited by Fourbit

Share this post


Link to post
Share on other sites
Everything works smashingly. Short and sweet urls, works great smile.gif

 

Found one small thing, but it can't be helped.

 

Because it links products without the category, such as item-name-p-10.html, if your item is in more than one category and you click to it, the breadcrumbs change to the items first category instead of the category you were in.

 

So if I had an item in "Tableware" and also in "Plates" and I was browsing "plates" and clicked on the item it would show in the breadcrumb as being in the "Tableware" section instead of the section I came from. Not too much of a problem, more of a customer "confused" issue. Don't want to make the url's wonky and have to make them item-name-p-10.html?14 (14 being the category they came from) maybe item-name-p-10-c-14.html wouldn't be so bad, still WAY shorter than originally.

 

Not sure the best way to handle it.... not that big a deal either way. tongue.gif

 

I'll look into wrapping something in the next release to try and address that...maybe do a referrer check and give preference that way.

 

Bobby

 

 

Anyone have any luck resolving this issue?

 

Chris


osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Share this post


Link to post
Share on other sites

You need to run the install script and then configure it from the newly installed admin control panel settings! Notice how SEO_URLS_CACHE_DIR is not being converted to its cooresponding value? That's because most likely it is not defined...which means it's not installed.

 

Run the install script, then configure. Make sure it is the FULL filesystem path beginning with a forward slash and ending with a slash!!

 

Make sure that you performed the step that adds code to the .htaccess file!

 

Hi

 

Managed to run the install file. Still getting the following errors on my site

 

Warning: fopen(home/iimdfjwt/cache/seo_english.cache): failed to open stream: No such file or directory in /home/iimdfjwt/public_html/includes/seo_cache.php on line 199

 

Warning: fwrite(): supplied argument is not a valid stream resource in /home/iimdfjwt/public_html/includes/seo_cache.php on line 200

 

Warning: fclose(): supplied argument is not a valid stream resource in /home/iimdfjwt/public_html/includes/seo_cache.php on line 201

 

Warning: main(home/iimdfjwt/cache/seo_english.cache): failed to open stream: No such file or directory in /home/iimdfjwt/public_html/includes/seo_cache.php on line 204

 

Warning: main(): Failed opening 'home/iimdfjwt/cache/seo_english.cache' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/iimdfjwt/public_html/includes/seo_cache.php on line


Regards

Paul

Share this post


Link to post
Share on other sites

missed the last line number. full error reads

 

Warning: main(): Failed opening 'home/iimdfjwt/cache/seo_english.cache' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/iimdfjwt/public_html/includes/seo_cache.php on line 204

 

Paul


Regards

Paul

Share this post


Link to post
Share on other sites

I've understand the modify of Webpixie. I've just addedd, but I don't see the manufactures name.


Skype: centoasa

Skype: remigioruberto

Share this post


Link to post
Share on other sites
You need to run the install script and then configure it from the newly installed admin control panel settings!  Notice how SEO_URLS_CACHE_DIR is not being converted to its cooresponding value?  That's because most likely it is not defined...which means it's not installed. 

 

Run the install script, then configure.  Make sure it is the FULL filesystem path beginning with a forward slash and ending with a slash!!

 

Make sure that you performed the step that adds code to the .htaccess file! 

 

Bobby

 

I have checked that I have the full filepath to the catalog folder instead of the stock /folder/ in .htaccess, and that the .htaccess file is residing in the catalog directory, but still no joy? Hmmm. Any more ideas would be much appreciated

 

regards

Share this post


Link to post
Share on other sites
Anyone have any luck resolving this issue?

 

Chris

It's not really an issue since it takes you to the same product. This may confuse customers but the root cause is linked products and not duplicate products.

Warning: main(): Failed opening 'home/iimdfjwt/cache/seo_english.cache'

...

Your path needs to start with a leading slash like this:

/home/iimdfjwt/cache/seo_english.cache

 

Otherwise it is interpreted as a relative path...it should be absolute!

 

Bobby

Share this post


Link to post
Share on other sites
It's not really an issue since it takes you to the same product.  This may confuse customers but the root cause is linked products and not duplicate products. 

 

Your path needs to start with a leading slash like this:

/home/iimdfjwt/cache/seo_english.cache

 

Otherwise it is interpreted as a relative path...it should be absolute!

 

Bobby

 

Hi

 

Thanks bobby, that seems to have done the trick.

And now i see it working, GREAT CONTRIBUTION, HIGHLY RECOMEND!

 

See it working here Gadgets UK

Paul


Regards

Paul

Share this post


Link to post
Share on other sites

It's amazing what it'll do when configured correctly :)

 

Try turnng on the rewrite option and then clear all your cache files...it gets even better! :)

 

Bobby

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

×