Apache

Un article de Informaticiens département des sciences de la Terre et l'atmosphère
Version depuis le 6 d'août 2014 à 12:15 par Toupin (Discuter | changes)
(diff) ←Version avant | Version courante (diff) | Version après→ (diff)
Aller à: navigation, charcher

How to Resolve “Page Not Found” Errors on Joomla Sites

By Seamus Bellamy and Steven Holzner from Joomla! For Dummies, 2nd Edition

When you tell Joomla to use SEF (static) URLs, some users may experience 404 errors (“page not found”) when they click menu items on your site. If the SEF URLs setting in Joomla breaks your menu items, creating URLs that can’t be found, you still have hope.

If you’re using the Apache web server, you can use the mod_rewrite module to instruct Joomla to rewrite URLs in SEF versions. Also, take a look at a popular extension called sh404SEF. Considered by many to be one of the best SEF tools available, sh404SEF is both JED Editor’s pick as well as a well-established download favorite among serious Joomla users.

You only need to worry about undertaking the following steps if the SEF URL option in the Global Configuration page breaks the URLs on your site. If the SEO Friendly URLs option is set to Yes in the Global Configuration page SEO pane and you find your Joomla site is functioning as it should, there’s no need to delve into this.


Check for mod_rewrite

First, find out whether your Apache installation includes mod_rewrite. One way is to check with the tech staff of your Internet hosting provider, but if your hosting provider’s tech staff is anything like mine, they won’t have a clue. You can check for the module yourself, however.

If find yourself hitting a brick wall every time you go looking for tech support, consider looking for a more Joomla-friendly hosting company. These days, there are a lot of them out there, and they would no doubt be thrilled to have your business.

If mod_rewrite is being loaded, you can see that in Joomla. Click on the Site button, located in the top left-hand corner of any back-end page. From the drop-down menu, select System Information. After the System Information page loads, select the PHP information tab. The complete sum of your Joomla site’s PHP information is now at your finger tips.

Configure Joomla to use mod_rewrite When mod_rewrite is available, you can configure Joomla to use it by renaming a file in Joomla’s root directory. Follow these steps:

Look in the directory where you installed Joomla for a file named htaccess.txt.

Rename this file .htaccess.

Restart Apache.

When Apache restarts, your new .htaccess file takes effect.

Choose Site →Global Configuration in any back-end page to open the Global Configuration page.

In the SEO Settings pane, select the Yes radio button in the Use Apache mod_rewrite section.

Voilà! SEF URLs should work for you now.

image0.jpg Many hosts don’t require you to restart Apache after making changes to your .htaccess file. Alternatively, some hosts may already have an .htaccess file which Joomla needs to be added to. If you encounter any difficulties in configuring your site to use mod_rewrite, check in with your hosting provider’s tech support for assistance.

SEF settings are very much dependent upon how your hosting provider is set up. Sadly, not all SEF settings work on all hosting providers. If you have issues with your SEF settings, you will need to check in with your hosting provider’s support services for assistance. As always, you can also rely upon the thousands of users at the Joomla.org support forums to provide you with tips to get you up and running.