You are on page 1of 3

How to check if mod rewrite is enabled on your server Many problems with SEO arise from the fact

that a host has not enabled mod_rewrite (Apache setting) on the servers. They often tell you they have (while they have not). You can verify if this is correct or not and if this is causing your server to issue HTTP Error 500. Here is how to check if mod-rewrite is really enabled! 1. Enable SEO in your administrator: In Joomla 1.0: Site -> Global Configuration -> SEO: Search Engine Friendly URLs to Yes. In Joomla 1.5: Site -> Global Configuration -> Site: Search Engine Friendly URLs to Yes, Use Apache mod_rewrite to Yes. (Setting Add suffix to URLs is optional). 2. Rename your htaccess.txt to .htaccess: Next place ONLY the following lines in your .htaccess: RewriteEngine On Options +FollowSymLinks RewriteRule ^joomla\.html http://www.joomla.org/? [R=301,L] 3. Now point your browser to: http://www.example.com/joomla.html (Replace www.example.com with your own domain name in the URL above.) If it redirects you to joomla.org then mod_rewrite is working. If it gives you an error then mod_rewrite is not working. Note: if your site is located in a folder such as "/test/" you need to insert the code in the root .htaccess file as follows: RewriteEngine On Options +FollowSymLinks RewriteRule ^test/joomla\.html http://www.joomla.org/? [R=301,L]

Enabling Search Engine Friendly (SEF) URLs Human readable or search engine friendly URLs are URLs that make sense to both humans and search engines because they explain the path to the particular page they point to. Since version 1.5, Joomla! is capable of creating and parsing URLs in any format, including human readable URL's. This does not depend on URL rewriting executed by the web server, so it works

even if Joomla! runs a server other than Apache with the mod_rewrite module. The process of creating and processing human readable URLs is called routing. Routing uses aliases that can be defined by the user. The procedure for enabling Search Engine Friendly URLs differs depending on the web server you are using. If you are using shared hosting, it is probably Apache. Ask your hosting provider for more information if you are uncertain. Apache These are step-by-step instructions. Please follow them in the order they are presented here. If a step fails, do not continue until you have solved the problem.
1. Rename the file "htaccess.txt" in your Joomla!'s base folder to ".htaccess". 2. This step may not be necessary. Open .htaccess in a text editor. Uncomment RewriteBase

/ (remove the first character, #). If Joomla is installed in its own folder, the enter the Joomla folder name after the backslash. e.g. RewriteBase /yourjoomlafolder. 3. Log on to your Back-end and open the Global Configuration. 4. Enable the Search Engine Friendly URLs option and Save. This option converts the URLs from the native Joomla! format to the SEF format. Check if your site works correctly. Your URLs should now look like http://www.example.com/index.php/the-news/1-latest-news/1-welcome-to-joomla. If your site does not work correctly, please see Why does your site get messed up when you turn on SEF (Search Engine Friendly URLs)?
5. Enable the Use Apache mod_rewrite/URL rewriting option and Save. This option uses

the Apache mod_rewrite function to eliminate the "index.php" portion of the URL. Check if your site works correctly. Your URLs should now look like http://www.example.com/the-news/1-latest-news/1-welcome-to-joomla. If this option causes errors, please see How to check if mod rewrite is enabled on your server. If it is not enabled and you have access to the file apache/conf/httpd.conf, open that file and check if the line LoadModule rewrite_module modules/mod_rewrite.so is uncommented. If necessary, uncomment the line and restart the Apache web server. If mod_rewrite cannot enabled, leave this option off. It does not matter if you leave the .htaccess file renamed.
6. If you think this necessary, enable Add suffix to URLs and Save. This option adds .html

to the end of URLs. There are different opinions on whether this is necessary or even useful. Search engines do not seem to care if your URLs end in .html or not.

7. Open the Plugin Manager and enable the System - SEF plugin. This plugin adds SEF

support to links in your Joomla articles. It operates directly on the HTML and does not require a special tag.

Why does your site get messed up when you turn on SEF (Search Engine Friendly URLs)? Usually this has something to do with your host's settings. One solution that commonly works is to enter a value for the $live_site variable in the configuration.php file found in the root directory of your Joomla site files. The value of the variable must be manually edited. Typically, it would look like: var $live_site = 'http://example.com'; But if you access your website in a folder, it would be like this: var $live_site = 'http://example.com/joomla'; Unfortunately, this does not always work correctly. Setting it to just your folder may help: var $live_site = '/joomla'; Sometimes the value (especially when determined by automatic installers other than that of Joomla!) can be present, but simply wrong. To enable the automatic base finding algorithm, empty it completely: var $live_site = '';

You might also like