How to use URL-suffices with MageBridge?
While MageBridge is first of all a Joomla! extension, that supports Joomla! SEF, it also brings content from Magento to Joomla!. When dealing with URL-suffixes, this complicates things. Joomla! is unaware of the logic that Magento uses and vice versa. If you want to implement URL-suffixes, please follow the steps below.
The main problem is that if Joomla! enables URL-suffixes (which is always ".html"), it will do so regardless of the actual URL. For this to work with MageBridge, you have to disable URL-suffixes in Magento. MageBridge detects the Joomla! setting and adds the URL-suffix to the Magento content if needed.
Steps to configure suffixes
- First of all you need to enable the URL-suffix in Joomla!. Login to Joomla!, browse to Global Configuration and within the tab Site, enable Add suffix to URLs. Note that you do not have the option to determine which suffix is used - by default it always is ".html".
- Next, login to Magento and browse to System » Configuration » Catalog » Search Engine Optimization. Make sure the settings Product URL Suffix and Category URL Suffix are left blank. If they contain some kind of value, remove that value.
- To finalize this, you need to rebuild the appropriate cache. In Magento, browse to System » Cache Management » Catalog Rewrites and click on the button Refresh. This will rebuild all the URLs of products and categories.
From now on, Joomla! is responsible for adding the right URL-suffix to all URLs.
NOTE: If a MageBridge URL ends with a forward-slash "/", it will not get an URL-suffix - this is in accordance to the Magento rules. For instance "checkout/cart/" will not get a suffix.
NOTE: Using a Magento URL suffix other than ".php" will not cause a conflict. However, if the Joomla! URL suffix is enabled, this will result into URLs ending with ".php.html".
Using Magento stand-alone with suffixes
Because the Magento configuration itself does not use URL-suffixes, browsing the store directly from Magento, will show URLs with no suffix. We recommend that visitors should never access the stand-alone Magento frontend, as soon as MageBridge is up and running - this in order to prevent duplicate content (SEO rule).
However, if you need the Magento-application for different reasons, we recommend you configure a different Website for MageBridge. Within the configuration scope for MageBridge you can disable suffixes, while in the scope for Magento you can enable them again.
Why so difficult?
The reason why using the same suffix on both sides is a bit more technical. If suffixes are enabled in Joomla!, Joomla! will append ".html" when building the URL. But this also means that Joomla! will remove the suffix when parsing the URL. This is how Joomla! deals with URL-routing.
But MageBridge only gets the end-result of the URL - meaning with the ".html" stripped. By then, there is no solid way to determine which URL should be sent to Magento (with or without suffix). We have experimented with reading the original URL (REQUEST_URI) but found that that method gave more problems than it solved.
Created on Saturday, 15 August 2009Modified on Sunday, 06 December 2009
More tutorials in this section
- Setting the MageBridge URLs in Magento
- Disabling user synchronization in MageBridge
- Importing and exporting users
- Using the MageBridgeLinks/JCE-plugin
- Best practices with MageBridge
- Using MageBridge Product Connectors
- Migrating users between Joomla! and Magento
- Using MageBridge stores to load a different Magento theme
- Using the MageBridge Content Plugin
- MageBridge SEO Guide
- Removing MageBridge
- Step-by-step: Adding a custom Magento block
- Managing MageBridge extensions
- How to use URL-suffices with MageBridge?
- Step-by-step: Create a Magento API user
- Step-by-step: Activating MageBridge plugins
- Step-by-step: Creating a MageBridge Menu-Item
- API permissions with MageBridge
- Configuring payment methods in MageBridge
- Using MageBridge modules
- Authentication guide for MageBridge
- Working with MageBridge URL Replacements
- Handling Downloadable Products in MageBridge
- Handling file uploads in MageBridge
- Configuring the MageBridge Root Menu-Item
- Setting MageBridge offline through the database
- How Joomla! works with MageBridge URLs
- Migrating MageBridge from Joomla! 1.5 to Joomla! 2.5
- Using the MageBridge System Plugin
