Difference between revisions of "Using Joomla Core SEF"

From JReviews Documentation
Jump to: navigation, search
(Created page with '== Default Joomla URLs == Examples of default non-SEF URLs: '''Content Article:''' *http://example.com/index.php?option=com_content&view=article&catid=8:smartphones&id=8:nokia-…')
 
 
(21 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Default Joomla URLs ==
 
 
Examples of default non-SEF URLs:
 
 
'''Content Article:'''
 
*http://example.com/index.php?option=com_content&view=article&catid=8:smartphones&id=8:nokia-5800-xpressmusic
 
 
 
'''JReviews menu item:'''
 
*http://example.com/index.php?option=com_jreviews&Itemid=6
 
 
 
'''Jreviews click2search pages (tags):'''
 
*http://example.com/index.php?option=com_jreviews&Itemid=6&url=tag/brand/Nokia_m6/
 
 
 
 
== Enabling Joomla Core SEF URLs ==
 
== Enabling Joomla Core SEF URLs ==
  
To make the URLs look nicer, you can enable Joomla core SEF:
+
To make the URLs look nicer, you should enable Joomla core SEF:
*Go to Joomla Global Configuration, and on first tab set '''Search Engine Friendly URLs''' and '''Use Apache mod_rewrite''' to '''Yes'''. 'Add suffix to URLs' is optional.  
+
*go to Joomla Global Configuration, and on first tab set '''Search Engine Friendly URLs''' and '''Use Url rewriting''' to '''Yes'''.  
[[File:JoomlaCoreSEF.png]]
+
*leave '''Add suffix to URLs''' disabled.  
 
+
*Next go to the root folder of your site and rename '''htaccess.txt''' file to '''.htaccess'''
+
 
+
 
+
After you refresh your site, URLs will be something like this:
+
 
+
'''Content Article:'''
+
*http://example.com/component/content/8-smartphones/9-samsung-i900-omnia
+
 
+
 
+
'''JReviews menu item:'''
+
*http://example.com/products
+
 
+
 
+
'''Jreviews click2search pages (tags):'''
+
*http://example.com/products/tag/brand/Nokia_m6/
+
 
+
 
+
URLs are nicer, but the Content Article URL is still too long. We should get rid of /component/content part.
+
 
+
So, instead of:
+
*http://example.com/component/content/8-smartphones/9-samsung-i900-omnia
+
 
+
you can have:
+
*http://example.com/products/8-smartphones/9-samsung-i900-omnia
+
 
+
or:
+
*http://example.com/smartphones/8-nokia-5800-xpressmusic
+
 
+
 
+
To have those type of URLs, it is required to create Joomla Article Section/Category menu items.
+
 
+
 
+
== Creating Joomla Article Section/Category Menu Items ==
+
 
+
Besides for nicer URLs when SEF is enabled, Article Section/Category menu items are required if you want your articles (listings) to inherit the modules from the Section/Category list pages. Without those menu items, modules will be lost when you click on article detail page.
+
 
+
You can create those menu items in a hidden menu so they will not be displayed on your site, because it is better to have JReviews Section/Category menu items for your navigation.
+
 
+
 
+
*Go to Joomla Menu Manager and create a new Menu: enter the '''Unique Name''' and '''Title''' (for example "SectionMenus" or "HiddenMenus", ...), but leave the '''Module Title''' empty, so that the module for this menu will not be created. Or you can create the module, but make it unpublished.
+
 
+
*After the menu is created, click on its name and create the menu items:
+
If you create "Section Blog Layout" menu items for all your sections, your article URLs will look like this:
+
*http://example.com/section-name/id-category-name/id-article-title
+
If you create "Category Blog/List Layout" menu items for all your categories, your article URLs will look like this:
+
*http://example.com/category-name/id-article-title
+
You probably have a lot more categories than sections, so creating Section menu items will be faster.
+
 
+
*After you created all your menu items, go to JReviews component page and click on "Clear Cache" link in the left menu.
+
 
+
 
+
Now your URLs will be much nicer and modules assigned to Section/Category list pages will not be lost when you view article (listing) detail pages.
+
 
+
  
With Joomla Core SEF it is not possible to remove ID numbers from URLs.
+
[[File:seo-settings.png]]
For that, you need to use one of Joomla SEF extensions like sh404SEF or SEF Advance (only those two are supported by JReviews).
+
  
But it is recommended to use Joomla Core SEF, using other SEF components can affect on your site's performance.
+
*go to the root folder of your site and rename '''htaccess.txt''' file to '''.htaccess''' if you don't already have the .htacess file. This is required for URLs to work when '''Use URL rewriting''' is enabled.
  
  
Line 87: Line 16:
 
[[Category:SEF]]
 
[[Category:SEF]]
 
[[Category:URLs]]
 
[[Category:URLs]]
[[Category:ItemIDs]]
 
[[Category:Modules]]
 

Latest revision as of 14:00, 7 January 2014

Enabling Joomla Core SEF URLs

To make the URLs look nicer, you should enable Joomla core SEF:

  • go to Joomla Global Configuration, and on first tab set Search Engine Friendly URLs and Use Url rewriting to Yes.
  • leave Add suffix to URLs disabled.

Seo-settings.png

  • go to the root folder of your site and rename htaccess.txt file to .htaccess if you don't already have the .htacess file. This is required for URLs to work when Use URL rewriting is enabled.