Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SEF Link Transformer (SE friendly URLs)


Recommended Posts

I've just uploaded this to contributions section. This thread for questions and suggestions.

 

Main idea of contribution - SE friendly URLs without changing a lot of osC code. Installation require adding 2 strings to 2 files and no changes on database.

Must work with any osC version and any other contibutions installed.

 

Works at http://www.mrstest.com (live shop, no test orders).

There is always more than one way to do it.

And always Keep It Simple, Stupid.

Link to comment
Share on other sites

  • Replies 129
  • Created
  • Last Reply

Top Posters In This Topic

Hello,

 

This looks like soemthing we would be interested in using!

 

I have loaded it up on our dedicated server:

 

www.medisave.net

 

but all the links work in categories, but if I try to go to a product from categories list I get nothing:

 

The link it gives is:

 

http://www.medisave.net/category47/product...oduct_info.html

 

Whereas I CAN get to products from say the specials link:

 

http://www.medisave.net/product295/product_info.html

 

Also I cannot get the add to cart button working!

 

Have I done something wrong?

 

Also you mention a pro version of this product i nthe readme - what does this do - how much is it ?

 

Graham

www.medisave.co.uk

 

PS - anything we can sell you?

 

http://www.medisave.net/category8/default.html ?

Graham Wright

________________

Link to comment
Share on other sites

Ups.. hasn't tested with original osC product listing, only with "columns listing". Update will be soon.

There is always more than one way to do it.

And always Keep It Simple, Stupid.

Link to comment
Share on other sites

Update uploaded :)

http://www.oscommerce.com/community/contributions,1332

 

For upgrade just overwrite .htaccess with new one.

 

Problem was that i forgot about subcategories.

Sorry for that, but i don't have a "testers team".

There is always more than one way to do it.

And always Keep It Simple, Stupid.

Link to comment
Share on other sites

Hello,

 

Thanks for the update - everything working now with the categories

 

However I am still unable to add to basket. Are there any changes I need to make in admin - I still have it all set as NOT search engine friendly URLS as I didnt think I needed to change this?

 

Anything else causing the add to basket not to work ?

 

cheers

 

Graham

Graham Wright

________________

Link to comment
Share on other sites

Thanks for the update - everything working now with the categories

 

However I am still unable to add to basket. Are there any changes I need to make in admin - I still have it all set as NOT search engine friendly URLS as I didnt think I needed to change this?

 

Anything else causing the add to basket not to work ?

 

What contributions you have installed? Can you send me your "product_info.php" file?

 

About admin settings - this mod doesn't have it. But SE friendly URLs must be OFF.

There is always more than one way to do it.

And always Keep It Simple, Stupid.

Link to comment
Share on other sites

Is this contribution very much different than the "SEF Urls" feature that is built into Os Commece (but still in development).  

 

Is this an improvement, does it fix some of the key problems with the other version?  

 

SEFLT is absolutely different from internal osc SEF URLs feauture.

Dunno about fixing key problems because i don't know key problems :) Can you tell me about?

There is always more than one way to do it.

And always Keep It Simple, Stupid.

Link to comment
Share on other sites

I don't personally know about an problems but I have heard that it has some definite glitches (that may or maynot be the case).

 

Search engine friendly urls is one of the most important featurs in an ecommerce site, becasuse without traffic you can not sell. You can have the best looking site in the world but not have anyone to show it to if you don't get indexed in the search engines.

 

Unfortuately I am not a programmer and have very little knowledge when it comes to PHP and other languages.

 

Thank you, i think this contribution shows great promise. Keep up the great work. As soon as I start on my Os Commerce site I will play around with this contrib (I am just doing some research right now).

 

Thanks again,

 

Take care

Link to comment
Share on other sites

Found the mod I made which may have caused the problem

 

http://www.oscommerce.com/community/contributions,952

 

......A version of my product listing in colums mod, that changes the buy now buttons from links to a form action.

 

To complement my SID killer

 

Cheers,

 

 

Graham.

Graham Wright

________________

Link to comment
Share on other sites

I tested SEF LT 0.6.0 with MS 2 release - working.

 

Has anyone (except medisave) try this contribution?

There is always more than one way to do it.

And always Keep It Simple, Stupid.

Link to comment
Share on other sites

So this contribution will transform link for example:

http://www.mrstest.com/product_info.php?products_id=60

 

to:

http://www.mrstest.com/product60/product_info.html

 

I like this idea though I have a quick question; what will happen to all the links I already have on some search engines that point to the first link "....product_id=60" with those link still work after we install this contribution?

 

Thanks,

Joseph

#Joseph

Link to comment
Share on other sites

So this contribution will transform link for example:

http://www.mrstest.com/product_info.php?products_id=60

 

to:

http://www.mrstest.com/product60/product_info.html

 

I like this idea though I have a quick question; what will happen to all the links I already have on some search engines that point to the first link "....product_id=60" with those link still work after we install this contribution?

 

Thanks,

Joseph

 

Old links will be working as usual.

There is always more than one way to do it.

And always Keep It Simple, Stupid.

Link to comment
Share on other sites

I tested SEF LT 0.6.0 with MS 2 release - working.

 

Has anyone (except medisave) try this contribution?

 

 

That is great that this works with MS2. I will be installing this contribution shortly. I can't wait to see how my rankings will improve.

 

Thank you so much Silencer, this is a much need contribution.

Link to comment
Share on other sites

Apology about it.

I just realized what had happened.

You named the file "like it should be" beginning a dot "." and when I unpack it in Linux it automatically went into hiding.

 

Thanks,

Joseph

:wink:

#Joseph

Link to comment
Share on other sites

Serj,

 

Ok, I have installed it on a fesh install. I am pretty sure the snapshot was from 05/18/03 (possibly from one dated 02/17/03).

 

Only the home page works, all links error 404: Object not found.

 

I have this installed in ...osc.solardirect.com/html directory. Of course I have apache pointing to this directory as home. I host my own sites, but have never dealt with .htaccess files before. What exactly do you mean to allow mod_rewrite directives? I have done a chmod ugo+rwx to this file -rwxrwxrwx, but no change.

 

I just spent the weekend coding and got my url's working pretty good on another test site, but this would obviously make life much easier. Any suggestions?

 

site with SEF mod: http://osc.solardirect.com

test site with code from allproducts discussion plus my own mods: http://test.solardirect.com

Check out my allprod and allcat pages - links in the Cat Box. Most url's working with names.

 

Kirk

Boom... Big butta boom.

Link to comment
Share on other sites

Man this stuff is hard.

 

I appreciate all the work that you have done here. Let me explain what I have done, and then maybe we can see how if, at all, it can be applied to your solution.

 

I tried to get this to work and had some significant problems getting it to work, all related to the rewrite rules.

 

I am sorry they were so complicated I could not understand them at all.

 

This is what I did.

 

I use the "all products" module, which creates one large list of all products for search engines to play with. Well it uses its own form of SEF urls, but from what I have been seeing they were not correct, and maybe yours were not correct either.

 

I also don't have my catalog at the top level of my site, I have it as /oscommerce/catalog, because I have other aspects of my site then just selling my wares.

 

Anyway I could not make heads nor tails of the Rewrite rules, they as the mod_rewrite author says are just like SendMail rules, and therefore are written in gibberish. BTW, I am an expert at regular expressions and it hurt my brain!!

 

Again I am only concerned with my allprods.php file generating urls that can be searched since it will place all of my products on it so it can further index them.

 

So I modified the code in allprods.php to write out the urls as follows:

 

XXX/oscommerce/catalog/product_info/products_id/38

 

This needs to be equivalent to

 

XXX/oscommerce/catalog/product_info.php?products_id=38

 

Notice that I forcibly dropped the .php; in my reading the .php is a no-no, and some including google may ignore that url since it is illegal.

 

Now again I could not make heads nor tails of the rewrite rules in .htaccess and that would not work for me.

 

So here is my replacement for the rewrite rules.

 

RewriteEngine on

RewriteBase /oscommerce/catalog

RewriteRule ^product_info/products_id/([0-9]+)$ product_info.php/products_id=$1

 

 

Here I specifically rewrite product_info/products_id/38 to

product_info.php?products_id=38

 

RewriteBase compensates for my positioning my catalog where I put it.

 

I do have the complicated part ([0-9+)$ that is much less complicated then what was before.

 

This works great for my specific purposes:

 

Here are my sources of information:

 

http://www.sitepoint.com/article/485

http://www.devarticles.com/art/1/506

 

I am sure we can formalize this if this if it is of interest to you all.

 

Sincerly

 

Julian

Link to comment
Share on other sites

Did you add this code to your .htaccess file in root_directory:

--------------

DirectoryIndex default.php

Options +FollowSymLinks

RewriteEngine on

RewriteBase /

RewriteRule ^([a-z]{2})/(.*)$ $2?language=$1&%{QUERY_STRING}

RewriteRule ^product([0-9]+_?[0-9]*)(/?.*)$ $2?products_id=$1&%{QUERY_STRING}

RewriteRule ^category([0-9]+_?[0-9]{0,4})/(.*)$ $2?cPath=$1&%{QUERY_STRING}

RewriteRule ^(.*).html(.*)$ $1.php?%{QUERY_STRING}

----------------

 

By default the file htaccess file has a leading dot "." so when you extract it it goes into hiding. Just click on view - show hidden files.

 

Joseph

#Joseph

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...