Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

2.34 Seo Urls Development


Recommended Posts

@@gadlol I'm looking to see your work. Nice!

 

For SEO Urls 5 there's freedom to configure the products link text:

Product link text can be made up of:
p = product name
c = category name
b = manufacturer (brand)
m = model
e.g. bp (brand/product)

By default it uses {product_alias}-p-{products_id}.html but any combination can be done. Personally I use the default one.

 

One thing to consider I'm thinking about is the fact that a product can be in several categories (as a copy) so have you already imagined how to manage that?

mystore.com/dvd-movies/action/die-hard-with-a-vengeance
mystore.com/by-country/USA/die-hard-with-a-vengeance
Link to comment
Share on other sites

@@gadlol

 

By my alias manager the alias table use alias name as global unique index item so if manufacturers equal with another product name it could not inserted in.

 

for example:

 

manufacturer: "gadlol" :: maufacturers_id=28

product name: "gladlol-x" :: product_id=28

 

or versus

 

so "gladlol" is unique in the alias table

Store the url into array element separately so you can work with it

$url = array("1"=>"gladlol",
             "2"=>"gladlol-1");

so $url[1] means maufacturers_id=28

 

sql table:

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

--
-- Tábla szerkezet ehhez a táblához `url_aliases`
--

CREATE TABLE IF NOT EXISTS `url_aliases` (
  `url_id` int(11) NOT NULL AUTO_INCREMENT,
  `language_id` varchar(11) NOT NULL,
  `parameter` text NOT NULL,
  `alias` text NOT NULL,
  PRIMARY KEY (`url_id`),
  UNIQUE KEY `reverse_parameter` (`language_id`,`parameter`(128)),
  UNIQUE KEY `reverse_aliases` (`language_id`,`alias`(128))
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=102 ;

--
-- A tábla adatainak kiíratása `url_aliases`
--

INSERT INTO `url_aliases` (`url_id`, `language_id`, `parameter`, `alias`) VALUES
(1, '2', 'products_id=1', 'Matrox-G200-MMS-MG200MMS'),
(2, '2', 'products_id=2', 'Matrox-G400-32MB-MG400-32MB'),
(3, '2', 'products_id=3', 'Microsoft-IntelliMouse-Pro-MSIMPRO'),
(4, '2', 'products_id=4', 'Gyilkosok-gyilkosa-DVD-RPMK'),
(5, '2', 'products_id=5', 'Sz%C3%A1rnyas-fejvad%C3%A1sz---rendez%C5%91i-v%C3%A1ltozat-DVD-BLDRNDC'),
(6, '2', 'products_id=6', 'M%C3%A1trix-DVD-MATR'),
(7, '2', 'products_id=7', 'A-szerelem-h%C3%A1l%C3%B3j%C3%A1ban-DVD-YGEM'),
(8, '2', 'products_id=8', 'Egy-bog%C3%A1r-%C3%A9lete-DVD-ABUG'),
(9, '2', 'products_id=9', 'Usz%C3%B3-er%C5%91d-DVD-UNSG'),
(10, '2', 'products_id=10', 'Usz%C3%B3-er%C5%91d-2---S%C3%B6t%C3%A9t-vid%C3%A9k-DVD-UNSG2'),
(11, '2', 'products_id=11', 'T%C5%B1z-a-m%C3%A9lyben-DVD-FDBL'),
(12, '2', 'products_id=12', 'Die-Hard-3.---Az-%C3%A9let-mindig-dr%C3%A1ga-DVD-DHWV'),
(13, '2', 'products_id=13', 'Hal%C3%A1los-fegyver-DVD-LTWP'),
(14, '2', 'products_id=14', 'V%C3%B6r%C3%B6s-sarok-DVD-REDC'),
(15, '2', 'products_id=15', '%C5%90r%C3%BClet-DVD-FRAN'),
(16, '2', 'products_id=16', 'A-b%C3%A1trak-igazs%C3%A1ga-DVD-CUFI'),
(17, '2', 'products_id=17', 'F%C3%A9ktelen%C3%BCl-DVD-SPEED'),
(18, '2', 'products_id=18', 'F%C3%A9ktelen%C3%BCl-2.---Teljes-g%C5%91zzel-DVD-SPEED2'),
(19, '2', 'products_id=19', 'Keresd-a-n%C5%91t-DVD-TSAB'),
(20, '2', 'products_id=20', 'Szeretett-DVD-BELOVED'),
(21, '2', 'products_id=21', 'SWAT-3--Close-Quarters-Battle-PC-SWAT3'),
(22, '2', 'products_id=22', 'Unreal-Tournament-PC-UNTM'),
(23, '2', 'products_id=23', 'Az-id%C5%91-kereke-PC-TWOF'),
(24, '2', 'products_id=24', 'Disciples--Sacred-Lands-PC-DISC'),
(25, '2', 'products_id=25', 'Microsoft-Internet-billenty%C5%B1zet-PS-2-MSINTKB'),
(26, '2', 'products_id=26', 'Microsoft-IntelliMouse-Explorer-MSIMEXP'),
(27, '2', 'products_id=27', 'Hewlett-Packard-LaserJet-1100Xi-HPLJ1100XI'),
(28, '2', 'products_id=28', 'Samsung-Galaxy-Tab-GT-P1000'),
(29, '2', 'products_id=29', 'Let%C3%B6lthet%C5%91-osCommerce-v2.3.4---oscom-1.0-oscomv1'),
(30, '2', 'cPath=1', 'Hardver'),
(31, '2', 'cPath=2', 'Szoftver'),
(32, '2', 'cPath=3', 'DVD-filmek'),
(33, '2', 'cPath=1_4', 'Hardver-Vide%C3%B3-k%C3%A1rty%C3%A1k'),
(34, '2', 'cPath=1_5', 'Hardver-Nyomtat%C3%B3k'),
(35, '2', 'cPath=1_6', 'Hardver-Monitorok'),
(36, '2', 'cPath=1_7', 'Hardver-Hangsz%C3%B3r%C3%B3k'),
(37, '2', 'cPath=1_8', 'Hardver-Billenty%C5%B1zetek'),
(38, '2', 'cPath=1_9', 'Hardver-Egerek'),
(39, '2', 'cPath=3_10', 'DVD-filmek-Akci%C3%B3'),
(40, '2', 'cPath=3_11', 'DVD-filmek-Tudom%C3%A1nyos-fantasztikus'),
(41, '2', 'cPath=3_12', 'DVD-filmek-V%C3%ADgj%C3%A1t%C3%A9k'),
(42, '2', 'cPath=3_13', 'DVD-filmek-Rajzfilmek'),
(43, '2', 'cPath=3_14', 'DVD-filmek-Thriller'),
(44, '2', 'cPath=3_15', 'DVD-filmek-Dr%C3%A1ma'),
(45, '2', 'cPath=1_16', 'Hardver-Mem%C3%B3ria'),
(46, '2', 'cPath=1_17', 'Hardver-CDROM-meghajt%C3%B3k'),
(47, '2', 'cPath=2_18', 'Szoftver-Szimul%C3%A1torok'),
(48, '2', 'cPath=2_19', 'Szoftver-Akci%C3%B3'),
(49, '2', 'cPath=2_20', 'Szoftver-Strat%C3%A9giai'),
(50, '2', 'cPath=21', 'Eszk%C3%B6z%C3%B6k'),
(51, '2', 'cPath=22', 'osCommerce'),
(52, '2', 'manufacturers_id=1', 'Matrox'),
(53, '2', 'manufacturers_id=2', 'Microsoft'),
(54, '2', 'manufacturers_id=3', 'Warner'),
(55, '2', 'manufacturers_id=4', 'Fox'),
(56, '2', 'manufacturers_id=5', 'Logitech'),
(57, '2', 'manufacturers_id=6', 'Canon'),
(58, '2', 'manufacturers_id=7', 'Sierra'),
(59, '2', 'manufacturers_id=8', 'GT-Interactive'),
(60, '2', 'manufacturers_id=9', 'Hewlett-Packard'),
(61, '2', 'manufacturers_id=10', 'Samsung'),
(62, '2', 'manufacturers_id=11', 'Oscom'),
(63, '2', 'account.php', 'account'),
(64, '2', 'account_edit.php', 'account_edit'),
(65, '2', 'account_history.php', 'account_history'),
(66, '2', 'account_history_info.php', 'account_history_info'),
(67, '2', 'account_newsletters.php', 'account_newsletters'),
(68, '2', 'account_notifications.php', 'account_notifications'),
(69, '2', 'account_password.php', 'account_password'),
(70, '2', 'address_book.php', 'address_book'),
(71, '2', 'address_book_process.php', 'address_book_process'),
(72, '2', 'advanced_search.php', 'advanced_search'),
(73, '2', 'advanced_search_result.php', 'advanced_search_result'),
(74, '2', 'checkout_confirmation.php', 'checkout_confirmation'),
(75, '2', 'checkout_payment.php', 'checkout_payment'),
(76, '2', 'checkout_payment_address.php', 'checkout_payment_address'),
(77, '2', 'checkout_shipping.php', 'checkout_shipping'),
(78, '2', 'checkout_shipping_address.php', 'checkout_shipping_address'),
(79, '2', 'checkout_success.php', 'checkout_success'),
(80, '2', 'conditions.php', 'conditions'),
(81, '2', 'contact_us.php', 'contact_us'),
(82, '2', 'cookie_usage.php', 'cookie_usage'),
(83, '2', 'create_account.php', 'create_account'),
(84, '2', 'create_account_success.php', 'create_account_success'),
(85, '2', 'index.php', 'index'),
(86, '2', 'login.php', 'login'),
(87, '2', 'logoff.php', 'logoff'),
(88, '2', 'password_forgotten.php', 'password_forgotten'),
(89, '2', 'password_reset.php', 'password_reset'),
(90, '2', 'privacy.php', 'privacy'),
(91, '2', 'product_info.php', 'product_info'),
(92, '2', 'product_reviews.php', 'product_reviews'),
(93, '2', 'product_reviews_info.php', 'product_reviews_info'),
(94, '2', 'product_reviews_write.php', 'product_reviews_write'),
(95, '2', 'products_new.php', 'products_new'),
(96, '2', 'reviews.php', 'reviews'),
(97, '2', 'shipping.php', 'shipping'),
(98, '2', 'shopping_cart.php', 'shopping_cart'),
(99, '2', 'specials.php', 'specials'),
(100, '2', 'ssl_check.php', 'ssl_check'),
(101, '2', 'tell_a_friend.php', 'tell_a_friend');

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

USU5 Pro also gives the ability to filter out words below X length. X is chosen by the shopowner. So can easily do this:

 

site.com/matrix-p-5.html

instead of

site.com/the-matrix-p-5.html

 

Useless words are not needed in URLs I guess.

Link to comment
Share on other sites

here are all the setting for url's 5 and what they do... directly from the manual. I suppose all variables would have to be available for backward compatibility. I believe this would also give you backward compatibility to chemo urls - although maybe someone who uses chemo urls should comment?

 

 

  • Enable SEO URLs
    • Effectively an on/off switch .. true being on .. false off
  • Enable the cache
    • Effectively an on/off switch for the caching system .. true being on .. false off
  • Enable multi language support
    • Turn on/off the multi language functionality .. true being on .. false off
  • Output W3C valid URIs
    • Output W3C valid links that won't break your validation
  • Select your chosen cache system
    • File:
      Stores the cache as a text file. No queries are used after the cache is fully loaded.
    • SQLite:
      Stores the cache in an SQLite database. No MySQL queries are used after the cache is fully loaded.
    • MySQL:
      Stores the cache in the database.
    • Memcache:
      Super fast Memcached option. Requires Memcache compiled in apache.
      This is really only a solution for shops running on dedicated/VPS servers as it is unlikely to be available in shared hosting
      Read the benefits here.
  • Set the number of days to store the cache
    • How many days a cache will be kept before auto deleting itself.
  • Choose the URI format
    • There are 4 options

      The difference between the four is shown below: -

      • Standard Seo Urls ( does not require mod_rewrite )
        • www.mysite.com/product_info.php/the-brand-etc-great-product-p-3
      • Path Standard Seo Urls ( does not require mod_rewrite )
        • www.mysite.com/product_info.php/the-brand-etc/great-product-p-3
      • Traditional Rewrite Seo Urls ( Requires mod_rewrite and RewriteRules added to .htaccess )
        • www.mysite.com/the-brand-etc-great-product-p-3.html
      • Path Rewrite Seo Urls ( Requires mod_rewrite and RewriteRules added to .htaccess )
        • www.mysite.com/the-brand-etc/great-product-p-3.html
  • Choose how your product link text is made up
    • There are 49 different ways to write your products link text. Any combination of the below ( e.g. bp produces brand-product name or brand/product name if the uri type is path based )
      • p = products name
      • c = category name
      • b = manufacturer name ( b for brand )
      • m = model
    • cbmp produces category-brand-model-product-name or category/brand/model/product-name if the uri type is path based
  • Filter Short Words
    • When creating a link from a product name you may want to remove the shorter words .. like a | or | at | the .. etc.
      Default value is 1 but you can choose to filter short words of 1 2 or 3 letters.
      A setting of 3 would filter out all words of three letters or less.
  • Add category parent to the beginning of the url
    • Enables/disables the option of adding the category parent to the beginning of category URLs.
  • Remove all non-alphanumeric characters
    • Removes all non alphanumeric characters .. this is best left as true.
      If your language uses special characters you will need to use the conversion system see extras/character_conversion_pack/instructions.txt
  • Add cPath to product URLs
    • Adds ?cPath=x to the end of product urls .. not sure why ( perhaps menu highlighting ) but retained for backwards compatibility.
  • Enter special character conversions
    • Convert/replace special language characters. As a comma seperated string .. like ..
      character=>convert,char2=>convert

      While this can still be used it has been replaced by the files in
      catalog/includes/modules/ultimate_seo_urls5/includes/character_conversion/
      To revert to using this method just delete all the files within the character_conversion folder .. but not the folder itself.

      See extras/character_conversion_pack/instructions.txt

  • Turn performance reporting on/off .. true being on .. false off
    • Shows USU5 performance at the bottom of your web shop.
  • Turn variable reporting on/off .. true being on .. false off
    • Shows USU5 class properties at the bottom of your web shop. Great for debugging.
  • Force www.mysite.com/ when www.mysite.com/index.php
    • Redirects index.php to your base domain. Beware! on some servers this creates a redirect loop so turn it on .. try it .. if it creates a loop turn it OFF.
  • Reset SEO URLs Cache
    • Clicking on "reset" will empty the cache
Link to comment
Share on other sites

I think the above got everything covered. Perhaps the sooner you release the test platform that's when it will be the best time to get bugs/features iron out. I don't believe any of the default SEOURL can do full cat path...only one I believe....

Link to comment
Share on other sites

That's a good news for all us, but where i can download the class?

 

Hello again guys.

 

@@Hotclutch

@@wHiTeHaT

@@acidvertigo

@@vampirehunter

@@giulmas

@@greasemonkey

@@Dan Cole

@@clustersolutions

@@Gergely

@@burt

@@bruyndoncx

 

This is to notify you about the awesome sefurls class and its current status.

 

New things:

 

Optional multilingual alias: for example: mystore.com/en/dvd-movies 

Optional Display the aliases from default language only: If you have multiple languages installed then you can keep the aliases of the default language and only change the language alias (en => gr).

 

For example:

 

Lets say that the default language in English with alias : en

 

So if we go to the greek language we will normally have "gr/dvd-movies/komwdia" and not "gr/dvd-movies/comedy"

But with just a click you can change an option from admin panel and so the greek language will use the english aliases AND SO we will have "gr/dvd-movies/comedy" . COOL!

 

Cache aliases: you may cache in db, apc or json file

Reset Cached aliases

Optional 301 redirect

Optional Use only last alias and not full path: for example instead of mystore.com/en/dvd-movies/action/speed you may wish mystore.com/en/speed or even mystore.com/speed

Duplicate alias check:  if there are duplicate aliases then sefurls auto increment a number so we don't have to worry about cloned - copied products which will probably gonna have same urls.

 

TODO:

 

Manufacturers aliases (its a bit pain in the ass)

 

Backward compatibility

 

in order to implement Backward compatibility I need you to provide me with all the different variations of urls.

So far I have spotted:

{product_alias}-p-{products_id}.html

{category_alias}-c-{categories_id}.html

{category_alias}-c-{categories_id}_{categories_id}.html

{category_alias}/{category_alias}-c-{categories_id}_{categories_id}.html

 

How many levels of subcategories there are? Does this apply : {category_alias}/{category_alias}/{category_alias}-c-{categories_id}_{categories_id}_{categories_id}.html ???

 

Is the extension '.html' optional or a necessity?

Should admin be able to input custom extension other than html? (SOMETHING THAT WOULD BE COOL) For example: mystore.com/dvd-movies.ole

 

PLEASE ADVICE

 

P.S. Thank you for keeping interest on this awesome, to be, addon. :-)

 

Your friendly neighborhood programmer,

 

John Barounis

Link to comment
Share on other sites

@@gadlol please supply the class file to those interested, upload as an addon or as a topic attachment.  I don't want this thread to turn out like the filters thread where in the end (after all the discussion) it is a paid-for product. 

 

Note; nothing wrong with paid-for (and in fact I prefer paid-for products to free products), but to advertise/discuss paid-for products you need to be a "Partner" and do it in your own special Partner channel.  

Link to comment
Share on other sites

Hello to all oscommercians guys. and especially to those who have responded to this thread. @@acidvertigo , @@vampirehunter, @@wHiTeHaT , @@burt , @@bruyndoncx

 

I HAVE SOME GREAT NEWS FOR YOU

 

I finally found some free time and developed a properly Search Engine Friendly Urls addon which does not require many core changes. And when I say properly I mean:

 

Categories:

 

mystore.com/dvd-movies

mystore.com/dvd-movies/action

e.t.c.

 

Product:

 

mystore.com/dvd-movies/action//die-hard-with-a-vengeance

 

Osc pageYou can rewrite any page in osc, for example you may wish to rewrite www.mystore.com/shopping_cart.php to www.mystore.com/cart (You can do that easily by the admin configuration panel)

 

mystore.com/cart

 

 

I do not think that having rewritten urls such as www.mystore.com/c-div-movies-action-p-die-hard-with-vengeance-p is a proper way (at least in my opinion)

 

 

LET ME EXPLAIN A BIT HOW I DID THAT:

 

First we need an htaccess file for Apache server with the simple code:

 

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]
</IfModule>

If you are using other than Apache you can translate that code to suit server.

 

Second: You must upload a php file inside the catalog/includes/classes. That sefurls.php contains the php sefurls class which does the magic.

 

Third: You must include - require that class in the application_top.php (One line of code)

require(DIR_WS_CLASSES . 'sefurls.php');

Fourth: add a piece of code to the tep_href_link (so that function to build us the right urls)

    global $sefurls;
    if(isset($sefurls) && $sefurls){
      extract($sefurls->process_link($page,$parameters));
      $link .= $seflink;
    }else{
    
      if (tep_not_null($parameters)) {
        
        $link .= $page . '?' . tep_output_string($parameters);
        $separator = '&';
        
      }else{
        
        $link .= $page;
        $separator = '?';


      }
    
    }

Fifth: add small peice of code to index.php so to recognize what page to include.

  if($sefurls->page_type!='category'){
  
    if($sefurls->include_page!=''){
      $PHP_SELF=$sefurls->include_page;
      include $sefurls->include_page;
      exit;
    }
  
  }

THATS IT. SIMPLE EH?

 

 

NOTE 1: Categories and products can auto create the url alias - slug based on categories name and products name BUT you have the ability to custom change those because my SEFURLS addon adds categories_alias and products_alias in the categories_description and in products_description

 

NOTE 2: The osc pages other than index.php and product_info do not get auto rewritten, you must do it from admin panel (very easy)

 

PROOF OF WHAT BEEN WRITTEN ABOVE:

 

Die hard with a Vengeance auto rewritten as die-hard-with-a-vengeance => http://www.johnbarounis.com/dev/osCommerce/store/dvd-movies/action/die-hard-with-a-vengeance

 

DVD Movies auto rewritten as dvd-movies = >http://www.johnbarounis.com/dev/osCommerce/store/dvd-movies

 

shopping_cart.php rewritten as cart => http://www.johnbarounis.com/dev/osCommerce/store/cart

 

specials.php rewritten as offers => http://www.johnbarounis.com/dev/osCommerce/store/offers

 

 

WHAT DO YOU THINK?

 

 

P.S. By using SEFURLS addon there will be no links that point to same product. For example www.mystore.com/cPath=3&products_id=56 points to the same page with www.mystore.com/products_id=56 which is bad for seo. So SEFURLS always rewrites products using the full categories path. For example the product Die Hard With A Vengeance will always have the url: dvd-movies/action/die-hard-with-a-vengeance and not just die-hard-with-a-vengeance

 

P.S. 2 With SEFURLS you can force old urls to redirect to the new ones so no old urls in use.

P.S. 3 You can easily enable/disable it from the admin panel.

P.S. 4 Added some other extra special options...

thanks

so is this going to be free or paid plugin

thanks

Link to comment
Share on other sites

  • 4 months later...

Hello fellows.

 

Here is the Topic for the SEO Friendly Urls addon which is based on the above posts.

 

http://www.oscommerce.com/forums/topic/408469-seo-friendly-urls-a-new-approach/

 

I will soon include your requests - improvements.

 

Thank you for your support.

Check out the great Alternative Administration System addon for osCommerce!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...