Joomla! CMS a SEF URL

700 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
700
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Joomla! CMS a SEF URL

  1. 1. Joomla! CMS a SEF URL Michal Unzeitig michal.unzeitig@artio.net www.artio.net JoomlaDay Prague, 1.3.2014
  2. 2. ARTIO – Brief Introduction  Software Development (general)  Open-source Implementation & Development  Working with Joomla since 2006   Authors of JoomSEF & sevaral other popular Joomla components www.artio.net JoomlaDay Prague, 1.3.2014
  3. 3. SEF URL What is SEF? Search Engine Friendly (and human as well) ● ● ● ● good for search engines (keywords in URL) good for humans – looks better, easier to remember mirrors site structure hides system parameters JoomlaDay Prague, 1.3.2014
  4. 4. SEF URL What is URL? (just kidding)  Typical Joomla (non-SEF, raw) URL http://domain.com/index.php? Ontologie: option=com_content& => component struktura metadat, view=article& => view vzájemné vazby id=3:welcome-to-your-blog&catid=9& => ids Itedmid=101 => menu rel. JoomlaDay Prague, 1.3.2014
  5. 5. URLs In Joomla – Standard Types  Ugly (non-SEF) http://domain.com/index.php? option=com_content&view=article&id=3:welcome-toyour-blog&catid=9&Itemid=101  Joomla native SEF (using routers) no mod_rewrite: Ontologie: struktura metadat, vzájemné vazby http://domain.com/index.php/3-welcome-to-your-blog with mod_rewrite: http://domain.com/3-welcome-to-your-blog JoomlaDay Prague, 1.3.2014
  6. 6. URLs In Joomla - mod_rewrite  Apache mod_rewrite powerful Apache web server module, allowing URL pre-processing Ontologie: struktura metadat, vzájemné vazby JoomlaDay Prague, 1.3.2014
  7. 7. URLs In Joomla - Add-ons  Joomla 3rd Party Add-on Extensions sh404sef, JoomSEF, AceSEF http://domain.com/blog/welcome-to-your-blog Ontologie: struktura metadat, vzájemné vazby JoomlaDay Prague, 1.3.2014
  8. 8. Basic Comparison Advantages Disadvantages No SEF Fast Consumes no resources Native SEF Resource not-demanding Include ID Fixed Format Needs Support by Ext. No Central Management Add-on SEF Clean URLs Needs more resources Variability Problematic for begginers Ext. Support Manageable at one place Additional Tools JoomlaDay Prague, 1.3.2014 Not friendly at all
  9. 9. Native VS Add-on (DB) SEF  Native SEF URLs need to be fully re-translatable, Add-on ones need not (DB use) => configurability and freedom for users     include category? (yes/no) include product name? (yes/no) Ontologie: Native SEF support needs to bestruktura metadat, built-in by component developer vzájemné vazby Add-on author can add support externally Add-on SEF URLs may not be suitable for large databases JoomlaDay Prague, 1.3.2014
  10. 10. How It Works  Native SEF URL translation without usage of DB router (piece of component code) must be able to translate URL from/to SEF format non-SEF URL → SEF URL → non-SEF URL Ontologie:  Limitations:   struktura metadat, vzájemné vazby SEF URL has to be created according to „translation rules“ Often has to include IDs JoomlaDay Prague, 1.3.2014
  11. 11. How It Works  Add-on SEF  ● Use DB storage for generated SEF URLs → need not to be able to „understand“ the URL Create SEF URL    ● Detect URLs in output code Ontologie: Build a SEF version for the URL struktura metadat, Store it to DB vzájemné vazby Load (Process) SEF URL – – Look into DB if URL is known Load the original non-SEF variables JoomlaDay Prague, 1.3.2014
  12. 12. SEF Add-ons Caveats 1 Duplicates ● ● Duplicate resource names (article-2, article-3) Additional variables in URLs (e.g. sorting, switches, layout options, etc.) JoomlaDay Prague, 1.3.2014
  13. 13. SEF Add-ons Caveats 2 Multiple Paths to a Resource ex.: Article linked from 2 menus, or different places. ● One or more URLs? (SEO point of view) ● Want to show different modules? (user view) ?option=com_content&view=article&id=3:welcome-to-yourblog&catid=9&Itemid=101 ?option=com_content&view=article&id=3:welcome-to-yourblog&catid=9&Itemid=125 Itemid identifies parent menu item. JoomlaDay Prague, 1.3.2014
  14. 14. SEF Add-ons Caveats 3 Ignorant Extension Developers    Not using correct Joomla API methods to generate URLs => URL cannot be SEFed (method JRoute::_()) Leaving unnecessary variables in URLs => causing duplicities Using too many formats of URLS => causing duplicities JoomlaDay Prague, 1.3.2014 Ontologie: struktura metadat, vzájemné vazby
  15. 15. Duplicate Prevention Methods Correct Menu Building ● using menu aliases Non-SEF Variables Definition virtuemart/list-all-products index.php?option=com_virtuemart&view=category Ontologie: struktura metadat, index.php?option=com_virtuemart&view=category&sort=price_desc vzájemné vazby virtuemart/list-all-products-2 virtuemart/list-all-products?sort=price_desc JoomlaDay Prague, 1.3.2014
  16. 16. Additional SEF Add-on Tools  301 Redirect Management  URL Protection (from deletion)  Meta-tags Management  Automatic Meta-tag Generation Ontologie:  Sitemap Generation  Connection to Google Analytics Tools  Site Protection (SQL Injections, etc.) JoomlaDay Prague, 1.3.2014 struktura metadat, vzájemné vazby
  17. 17. Component Authors  Want to have SEF URLs in your component?    write a router (native SEF) write a SEF extension for SEF Add-on Plan desired URLs in advance. Ontologie: struktura metadat, vzájemné vazby  Only put to URL what is really important.  Limit number of URL types. JoomlaDay Prague, 1.3.2014
  18. 18. Thank You Thank you for your attention. Ontologie: struktura metadat, vzájemné vazby JoomlaDay Prague, 1.3.2014

×