Bonjour,
J'essaie de règler CMS Made Simple 1.2 fr pour la réécriture d'URL.
Avec $config['internal_pretty_urls'] = false; j'obtiens l'url suivante :
http://www.xxxx.com/index.php/securite- ... umentation
Mais ça ne me convient pas, j'aimerai obtenir l'URL suivante : http://www.xxxx.com/securite-routiere/d ... ation.html
Voici ma config (je suis sur un serveur Amen) :
#------------
#URL Settings
#------------
#Show mod_rewrite URLs in the menu? You must enable 'use_hierarchy' for this to work for modules
$config['assume_mod_rewrite'] = true;
#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '.html';
#If you don't use mod_rewrite, then would you like to use the built-in
#pretty url mechanism? This will not work with IIS and the {metadata} tag
#should be in all of your templates before enabling.
$config['internal_pretty_urls'] = false;
#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy? (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = true;
Fichier .htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
Malheureusement, j'ai toujours ce message d'erreur : Internal Server Error
Est-ce que quelqu'un a une idée ?
D'avance merci,
Ben
[Résolu] Réécriture d'URL - Internal Server Error
Moderator: jce76350
[Résolu] Réécriture d'URL - Internal Server Error
Last edited by bmunsch on Tue Nov 13, 2007 9:48 am, edited 1 time in total.
-
- Power Poster
- Posts: 272
- Joined: Wed Sep 13, 2006 4:41 pm
Re: Réécriture d'URL - Internal Server Error
Bonsoir,
Je crois que tous les hébergeurs n'acceptent pas la réécriture d'URL.
C'est à vérifier chez amen.
Mon fichier htaccess se présente ainsi (fonctionne très bien chez OVH):
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond % !-f [NC]
RewriteRule ^(.*)\.htm$ /index.php?page=$1 [QSA]
Je crois que tous les hébergeurs n'acceptent pas la réécriture d'URL.
C'est à vérifier chez amen.
Mon fichier htaccess se présente ainsi (fonctionne très bien chez OVH):
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond % !-f [NC]
RewriteRule ^(.*)\.htm$ /index.php?page=$1 [QSA]
Re: Réécriture d'URL - Internal Server Error
Merci de ta réponse.
J'ai réussi à trouver la solution pour activer la réécriture d'URL chez Amen, en fait il faut activer Options +FollowSymLinkset et RewriteEngine on :
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
Voilà en espérant que ça fera gagner du temps à certains.
A+
J'ai réussi à trouver la solution pour activer la réécriture d'URL chez Amen, en fait il faut activer Options +FollowSymLinkset et RewriteEngine on :
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
Voilà en espérant que ça fera gagner du temps à certains.
A+
Re: [Résolu] Réécriture d'URL - Internal Server Error
Merci pour ce partage d'informations. C'est vraiment un plus de savoir les particularités des hébergeurs.
Bon webmastering à tous !
Pierre M.
PS : rewrite+err500 -> scruter avec rewritelog
Bon webmastering à tous !
Pierre M.
PS : rewrite+err500 -> scruter avec rewritelog