Jump to content

Recommended Posts

Hello, I have started building a seo urls mechanism.

 

So far I have managed to display:

 

Categories links examples:

 

www.mydomain.com/category-alias/

www.mydomain.com/category-alias/sub-category-alias

www.mydomain.com/category-alias/sub-category-alias/sub-category-alias

www.mydomain.com/category-alias/sub-category-alias/sub-sub-category-alias/sub-sub-sub-category-alias

e.t.c.

 

Products links examples:

 

www.mydomain.com/category-alias/product-alias

www.mydomain.com/category-alias/sub-category-alias/product-alias

www.mydomain.com/category-alias/sub-category-alias/sub-category-alias/product-alias

www.mydomain.com/category-alias/sub-category-alias/sub-sub-category-alias/sub-sub-sub-category-alias/product-alias

e.t.c.

 

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

 

www.mydomain.com/specials.php => www.mydomain.com/specials

www.mydomain.com/products_new.php => www.mydomain.com/products_new

e.t.c.

 

It requires apache mod rewrite and catalog php files such as ( index.php, specials.php, products_new.php ) to be placed under a folder lets say "pages" and leave in the main catalog folder only one file called index.php which will handle requests and address to the right php file.

 

So if we are going to the specials page the "root" index.php will require the pages/specials.php which is the same file as specials.php but without the require('includes/application_top.php'); because it is already called by the root index.php.

 

The seo urls slugs are stored in db (for products are saved in: products_seo_url located in products_description table, that way you can have different slug depending on selected language )

 

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

What do you think?

 

Are you interested? Should I continue developing it?

 

Check out the great Alternative Administration System addon for osCommerce!

Share this post


Link to post
Share on other sites

you mention 2.34 in the subject line, isn't your file directory structure more like 2.4 and thus is 2.4 the target codebase for this ?

otherwise it looks like it would impact a site quite a lot, and make it more difficult to integrate other 2.3x based contributions


KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

Personally would discontinue as it appears your changes make too many changes to the core.

 

Seo urls is a myth anyway...


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

I would like a less obtrusive solution for this. For example, generate the slug on the fly and use the db or file system as cache storage (this can be implemented in a header tag module for example). The actual index.php can be renamed to something as "categories.php" and the new index.php file can remain in the same catalog folder.

Share this post


Link to post
Share on other sites

Hello @gadiol i bump this post because I was searching to elaborate the seo url from application_top.php file with "use search safe URLS" on true in admin, and without .htaccess and database edits.

 

on application_top.php at line 88 after

// define general functions used application-wide
  require('includes/functions/general.php');
  require('includes/functions/html_output.php');

add:

  if  (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
    $link = $_SERVER['REQUEST_URI'];
    $match = array('action', 'cPath', 'manufacturers_id', 'products_id', 'pid');
  
    $url_array = explode('/', $link);
  
    foreach($url_array as $key => $value) {
      if (in_array($value,$match)) {
        $_GET[$value] = $url_array[$key+1]; 
      }
    }
  }  

this code permits to make the oscommerce "use search safe URLS" feature working passing the $_GET variables. (this is true for the OSC master on github but it can work also with the current release).

 

The next step could be to generate a slug on the fly in the tep_href_link function and next modify the code above in application_top to understand the actual page slug like: http://demo.oscommerce.com/speed-cruise-control-p-18.html 

 

I don't know if i have explained well that idea. To reassume i like to have sef urls modifying only application top and tep_href_link code without change the database or load a lot of redundant classes for pages, this code is not complete i know, i want just to share a possibility.  

 

can this be of interest?

Share this post


Link to post
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...


Check out the great Alternative Administration System addon for osCommerce!

Share this post


Link to post
Share on other sites

 

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)

 

 

That's a big statement.

 

Some of us have been using SEO URLs for years, first Chemo's contribution and then FWR's, both of which are reliable IMO

 

BTW how does your module handle

 

http://www.johnbarounis.com/dev/osCommerce/store/dvd-movies/action/die-hard-with-a-vengeance?manufacturers_id=4&

 

and

 

http://www.johnbarounis.com/dev/osCommerce/store/dvd-movies/action/die-hard-with-a-vengeance

 

That's duplicate content, that's handled with the current SEO URL modules.

Share this post


Link to post
Share on other sites

Please supply the sefurls class file - you can attach it to a post.

 

@@wHiTeHaT and I were talking about Urls in the chat the other day, and I think we came to a view that;

 

1.  calling any URL "SEF" Search Engine Friendly is simply untrue.  All search engines deal these days with ?blah=blah urls and have done for many years.  More important for SEO is Microdata.

 

2.  Human friendly Urls have some importance.  But what is not needed is such long URLs like;

 

site.com/dvd-movies/action/die-hard-with-a-vengeance and not just die-hard-with-a-vengeance

 

Why not to have, nice and simple:  site.com/die-hard

Edited by burt

This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

Hi @@gadlol,

 

I'd prefer shorten aliases than real categories or product names because we can get better human results.

 

Never forget to display products_id or categories_id in URL-s because you can run on false when the catalog use the same name without ID.
(or use aliases)
 


: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.

Share this post


Link to post
Share on other sites

That's a big statement.

 

Some of us have been using SEO URLs for years, first Chemo's contribution and then FWR's, both of which are reliable IMO

 

BTW how does your module handle

 

http://www.johnbarounis.com/dev/osCommerce/store/dvd-movies/action/die-hard-with-a-vengeance?manufacturers_id=4&

 

and

 

http://www.johnbarounis.com/dev/osCommerce/store/dvd-movies/action/die-hard-with-a-vengeance

 

That's duplicate content, that's handled with the current SEO URL modules.

 

Hi @@Hotclutch , perhaps you misunderstood something: you can enter any get variables at the end of the urls as you could do with default osc, but by using SEFURLS you will not find mystore.com/die-hard but instead mystore.com/dvd-movies/action/die-hard everywhere for that product. By using default osc urls we had mystore.com?cPath=3_5&products_id=3 but we also had mystore.com?products_id=3 which could be found in some boxes such as specials and new products that where exist in the left and right columns.

 

 

 

Please supply the sefurls class file - you can attach it to a post.

 

@@wHiTeHaT and I were talking about Urls in the chat the other day, and I think we came to a view that;

 

1.  calling any URL "SEF" Search Engine Friendly is simply untrue.  All search engines deal these days with ?blah=blah urls and have done for many years.  More important for SEO is Microdata.

 

2.  Human friendly Urls have some importance.  But what is not needed is such long URLs like;

 

site.com/dvd-movies/action/die-hard-with-a-vengeance and not just die-hard-with-a-vengeance

 

Why not to have, nice and simple:  site.com/die-hard

 

@@burt with my class you can easily have site.com/die-hard with some adjustments. I prefer to include the categories in the path because sometimes users may remove the last alias and so to get to the category and so on. Yes it should not be called SEF URS but instead Human friendly urls, HFURLS. So what would be the best name for such an addon?

 

 

Hi @@gadlol,

 

I'd prefer shorten aliases than real categories or product names because we can get better human results.

 

Never forget to display products_id or categories_id in URL-s because you can run on false when the catalog use the same name without ID.

(or use aliases)

 

 

Hi @@Gergely ,

 

"Never forget to display products_id or categories_id in URL-s because you can run on false when the catalog use the same name without ID." perhaps that true but this will happpen only if you have categories and products with same name. But I prefer not to add them in the url because then there is no need to rewrite the urls. The goal is not to use the products_id and cPath variable in the url.


Check out the great Alternative Administration System addon for osCommerce!

Share this post


Link to post
Share on other sites

Hi @@Gergely ,

 

"Never forget to display products_id or categories_id in URL-s because you can run on false when the catalog use the same name without ID." perhaps that true but this will happpen only if you have categories and products with same name. But I prefer not to add them in the url because then there is no need to rewrite the urls. The goal is not to use the products_id and cPath variable in the url.

What will be with the navigation in the catalog if we have cloned products?

Edited by Gergely

: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.

Share this post


Link to post
Share on other sites

What will have the navigation in the catalog if we have cloned products?

 

Cloned products in the same category? If yes then Huston we have a problem, so we need to append something to the url to distinguish i guess.


Check out the great Alternative Administration System addon for osCommerce!

Share this post


Link to post
Share on other sites

If you use a "slug" system, this would not matter.  Check all slugs are unique.

Done.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

cPath used for navigation (for categories box) so you can not forget it.


: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.

Share this post


Link to post
Share on other sites

Hi @@Hotclutch , perhaps you misunderstood something: you can enter any get variables at the end of the urls as you could do with default osc, but by using SEFURLS you will not find mystore.com/die-hard but instead mystore.com/dvd-movies/action/die-hard everywhere for that product. By using default osc urls we had mystore.com?cPath=3_5&products_id=3 but we also had mystore.com?products_id=3 which could be found in some boxes such as specials and new products that where exist in the left and right columns.

 

 

@@gadlol, sorry, thought you were comparing to other SEO modules. 

Share this post


Link to post
Share on other sites

@@gadlol

oops, bad timing, I just went from kiss back to chemo's seo urls earlier this month and still busy cleaning up code and getting rid of little nuisances ...

 

Any system I need has to support

* multi-language (www.site.com/[en|nl|fr])

* manufacturers

* ü é è

* manufacturer-productname-p-pid construction


KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

Just read this post...walked down this path last Nov...

 

First thing first...kudos to you for taking on such a challenging task...couple thoughts...

 

1) Keep in mind of backward compatibility with the older modules. I kept FWR's for that reason. My site is 10 yrs old, and I wouldn't want more work to 301 redirect all indexed URLs.

 

2) SEO or User friendly URL or not, I think I would still use your module for new sites as Google isn't the only search engine that I am after. I am very sure that there's a demand for it or else the other shopping carts/CMS wouldn't be bothering with it.

 

3) It's more difficult to do without the -p-, -c-, and etc. anchors.

 

4) I got rid of the need to have cPath in the URL by generating the cPath in FWR's module (yes, the category box needs it).

 

5) Cloned products...ahh...that was a tough one...I ended up using "rel=canonical" on a default category path. Had I had more time perhaps I would allow the user to set the default rel canonical path for cloned products...but I did not...

 

6) Just for consistence sake, I kept the breadcrumb trails the same as my full cat path...

 

7) The existing modules do more than just URL rewrite...it also manages 301 redirect (I can change a product name and the redirect is done automatically), index.php removal, caching (kinda important), & etc... 

 

8) give up the thought on no core code mod...it won't happens until something is in place for OSC...this was the reason I kept FWR's as I remember the mess implementing the other one 10 years ago...

 

Couple with other comments on multi languages there would be a lot of incentives to just build from an existing module...my $0.02...

 

Tim

 

Hi @@Hotclutch , perhaps you misunderstood something: you can enter any get variables at the end of the urls as you could do with default osc, but by using SEFURLS you will not find mystore.com/die-hard but instead mystore.com/dvd-movies/action/die-hard everywhere for that product. By using default osc urls we had mystore.com?cPath=3_5&products_id=3 but we also had mystore.com?products_id=3 which could be found in some boxes such as specials and new products that where exist in the left and right columns.

 

 

 

 

@@burt with my class you can easily have site.com/die-hard with some adjustments. I prefer to include the categories in the path because sometimes users may remove the last alias and so to get to the category and so on. Yes it should not be called SEF URS but instead Human friendly urls, HFURLS. So what would be the best name for such an addon?

 

 

 

Hi @@Gergely ,

 

"Never forget to display products_id or categories_id in URL-s because you can run on false when the catalog use the same name without ID." perhaps that true but this will happpen only if you have categories and products with same name. But I prefer not to add them in the url because then there is no need to rewrite the urls. The goal is not to use the products_id and cPath variable in the url.

Share this post


Link to post
Share on other sites

Thank you all for your messages.

 

I will continue to develop it ( before release a public version ) and next things to develop are:

 

1) Manufactures rewrites

 

2) Multi language use, if admin wants to use language slug (for example for the Greek language all the urls will start www.store.com/gr/ ) Note this is optional. The default language will be also optional to have or not the language alias. For example some admins may want to use the en slug even for the DEFAULT English language.

 

3) Optional 301 Redirects for auto redirection (Admins will enable 301 redirect from the admin configuration) Will only be used if force redirect to new urls is set to True. Maybe give option to admins to also use 302 redirect.

 

4) Duplicate urls check. There will be a scan that will check for duplicates. If found duplicate then apply something at the end of the alias for example:

 

mystore.com/dvd-movies

mystore.com/dvd-movies-1

 

The auto create alias function already transliterates characters to ASCII :

 

Latin ( for example â to a )

Greek ( for example λ to l )

Turkish ( for example Ğ to G )

Russian ( for example Й to J )

Ukrainian ( for example ґ to g )

Czech ( for example ů to u )

Polish ( for example ł to l)

Latvian ( for example ķ to k)

 

But if anyone wants to use those characters he must add aliases manually containing those chars OR select the option not to transliterate.

 

THOUGHTS:

 

Give admins ability to choose delimiter for alias for more than one word (Dvd movies to dvd-movies or dvd_movies)

Give admins ability to choose delimiter for categories and products (.com/dvd-movies/action => .com/dvd-movies_action )

 

Cache mechanism. I will probably add the ability to cache the urls. If use cache then cache the urls in db, apc or json flat file

 

WHAT DO YOU THINK ? ( especially about the THOUGHTS above )

 

A question about the name of this addon is it good - catchy to name it: SEFURLS ?

 

 

 

 


Check out the great Alternative Administration System addon for osCommerce!

Share this post


Link to post
Share on other sites

@@gadlol - John...is there a prize. :)

 

A question about the name of this addon is it good - catchy to name it: SEFURLS ?

 

How about CFURLS (Customer Focused/Friendly URLS) or UFURLS (User Focused/Friendly URLS)?

 

Dan

Share this post


Link to post
Share on other sites

1) Keep in mind of backward compatibility with the older modules. I kept FWR's for that reason. My site is 10 yrs old, and I wouldn't want more work to 301 redirect all indexed URLs.

+1 to backward compatibility.

 

I've managed to keep the same url structure using either chemo or FWR URLs for 7 years in 2.2ms2, 2.3.3.x and now 23.4 BS.

 

In that time I've had 2 competitors redo their sites - loosing their url structure.......and ALL their Google rankings. (Not sure the software on one... But I know for sure the other moved from OsC to shopify).

 

Backward compatibility has allowed me to move up the ranks, slowly but surely... While they fall down.

Share this post


Link to post
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...

Hi, I would ask you if the file sefurls.php has to be created by your useful code... If else, how you have to create it?

Edited by giulmas

Share this post


Link to post
Share on other sites

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


Check out the great Alternative Administration System addon for osCommerce!

Share this post


Link to post
Share on other sites

@@gadlol John here is a snippet from my htaccess file...I believed the code came from Ultimate SEO....the snippet probably covers all the URLs that are generated...for subcategories the additional category numbers are simply added to the URLs.  ie c-1_8_12.html. 

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-au-(.*).html$ articles.php?authors_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-([0-9]+).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}

Dan

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

×