Learning to manage your URLs in is an important step in keeping your website clean and user-friendly. Not to mention search engines can use words and structure of URL's to help users find content.
This guide is focused on getting you started with using sh404SEF with mod_rewrite.
We will talk about:
mod_rewrite is short for module rewrite. It is a module built to work with the Apache server application that can control URL's from the server level. Most hosting companies use it or have it available. It helps to protect your website and gives you an added layer of security. It is also used for aesthetic purposes like creating easier to read URL's from hard to read ones.
Turns into this
To use the module rewrite you can enter code into the .htaccess file. This is a files that allows users to write rules. You can write rules that turn URL's like the one above into something readable. It has even been used to block users from seeing images on their site that they are not supposed to see.
We choose not to rewrite these rules by hand, instead we use a great Joomla plugin called sh404SEF. It can handle all of these rules and writes them for you.
If you want to learn more about writing rules for mod_rewrite visit this helpful documentation at the Apache website
Good URL's (Or readable URLs) are known as SEF urls. SEF = Search Engine Friendly
Bad URLs are .... well... bad. As you can see from the example above this URL: http://joomlahosting.co/index.php?option=com_content&view=category&id=18&Itemid=223 is clearly not very useful. Both people and search engines like when it's easy to read the URL. This means, you should spend time thinking about how you want to organize your website so that your URL's make sense.
At JoomlaHosting.co we try not to go beyond 3 levels. http://joomlahosting.co/joomla-basics/articles-and-categories-explained is one of our longest urls. We have several big categories like 'Joomla Basics'. We have ones like 'reviews', 'performanc', etc... Then after the category we have our article titles. We feel like this is a good structure. There probably isn't a reason to go 4 levels deep unless you have a ton of articles and categories.
Some Basic Settings:
Heres how our categories with the different options
pretend this is our URL: joomlahosting.co/joomla/expert-advice/using-joomla/articles-and-categories
The easiest way to redirect one URL to another in sh404SEF is by using 'Url manager'.
Say you want to redirect a URL like the one below: