Actions

Difference between revisions of "Common problems when enabling Search Engine Friendly (SEF) URLs"

From Joomla! Documentation

(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
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.
+
Enabling Search Engine Friendly (SEF) URLs can cause problems if your website hosting is not properly configured to support the re-writing of URLs.  There are many different combinations of server technologies and operating systems, so it is not possible to give definitive answers to every problem with SEF URLs, however some of the more common problems are listed below.
 +
 
 +
==Is your server running Apache?==
 +
When you enable SEF URLS in Joomla! there is an option to re-write the URLs without /index.php/ which requires mod_rewrite (or the IIS equivalent) - if your server is not running Apache, or does not have the ability to rewrite URLs in this way, you will come across error messages with this option enabled.  Try turning this option to 'no' and see if this method of re-writing works for you. 
 +
 
 +
==Is your server running IIS?==
 +
If you are using IIS check out these links which may be useful:
 +
* [[IIS and Joomla]]
 +
* [[IIS6 and SEF URLs using Joomla 1.5x]]
 +
* [[IIS7 and SEF URLs using Joomla 1.5x]]
 +
* [[IIS]]
 +
 
 +
==Did you clear your cache?==
 +
When you make any changes to SEF settings it is advisable to make sure that you clear your cache, and if you are caching URLS (for example using a third-party SEF extension) make sure that you change any settings there, and purge cached URLs if necessary.
 +
 
 +
==Have you moved domains?==
 +
Sometimes if you have changed domains (for example from a localhost or test environment to the live domain) you will need to edit the value for the <code>$live_site</code> 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, it cannot be accessed via the Global Configuration screens.
  
 
Typically, it would look like:
 
Typically, it would look like:
<pre>
+
<source lang="php">
 
var $live_site = 'http://example.com';
 
var $live_site = 'http://example.com';
</pre>
+
</source>
But, if you access your Web site in a folder, it would be like this:
+
Or, if you access your website in a sub-folder called joomla, it would be like this:
<pre>
+
<source lang="php">
 
var $live_site = 'http://example.com/joomla';
 
var $live_site = 'http://example.com/joomla';
</pre>
+
</source>
 
+
When you move domains, this value may need updating to reflect your new domain name:
 +
<source lang="php">
 +
var $live_site = 'http://mynewdomain.com';
 +
</source>
  
'''Note:  If the $live_site variable is already set correctly then try'''
+
Often, there is no need to specify this variable at all - in which place simply leave it blank:
<pre>
+
<source lang="php">
 
var $live_site = '';
 
var $live_site = '';
</pre>
+
</source>
  
 
* See [http://help.joomla.org/ghop/feb2008/task110/GHOPC_J110_SEFrevised-1.odt Joomla! v 1.5 SEF URLs] [http://www.scribd.com/doc/2300167/Joomla-v-15-Configure-and-troubleshoot-SEF-URLs Scribd] by [[GHOP students/Benjamin Hättasch|Benjamin Hättasch]] which contains step-by-step instructions for installing and trouble-shooting your SEF URLs.
 
* See [http://help.joomla.org/ghop/feb2008/task110/GHOPC_J110_SEFrevised-1.odt Joomla! v 1.5 SEF URLs] [http://www.scribd.com/doc/2300167/Joomla-v-15-Configure-and-troubleshoot-SEF-URLs Scribd] by [[GHOP students/Benjamin Hättasch|Benjamin Hättasch]] which contains step-by-step instructions for installing and trouble-shooting your SEF URLs.
[[Category:FAQ]]
+
<noinclude>[[Category:FAQ]]
 
[[Category:Administration FAQ]]
 
[[Category:Administration FAQ]]
 
[[Category:Getting Started FAQ]]
 
[[Category:Getting Started FAQ]]
[[Category:Version 1.5 FAQ]]
+
[[Category:Search Engine Friendly URLs]]</noinclude>
[[Category:Search Engine Optimization]]
+

Revision as of 08:15, 13 July 2013

Enabling Search Engine Friendly (SEF) URLs can cause problems if your website hosting is not properly configured to support the re-writing of URLs. There are many different combinations of server technologies and operating systems, so it is not possible to give definitive answers to every problem with SEF URLs, however some of the more common problems are listed below.

Contents

Is your server running Apache?

When you enable SEF URLS in Joomla! there is an option to re-write the URLs without /index.php/ which requires mod_rewrite (or the IIS equivalent) - if your server is not running Apache, or does not have the ability to rewrite URLs in this way, you will come across error messages with this option enabled. Try turning this option to 'no' and see if this method of re-writing works for you.

Is your server running IIS?

If you are using IIS check out these links which may be useful:

Did you clear your cache?

When you make any changes to SEF settings it is advisable to make sure that you clear your cache, and if you are caching URLS (for example using a third-party SEF extension) make sure that you change any settings there, and purge cached URLs if necessary.

Have you moved domains?

Sometimes if you have changed domains (for example from a localhost or test environment to the live domain) you will need to edit the 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, it cannot be accessed via the Global Configuration screens.

Typically, it would look like:

var $live_site = 'http://example.com';

Or, if you access your website in a sub-folder called joomla, it would be like this:

var $live_site = 'http://example.com/joomla';

When you move domains, this value may need updating to reflect your new domain name:

var $live_site = 'http://mynewdomain.com';

Often, there is no need to specify this variable at all - in which place simply leave it blank:

var $live_site = '';