Bonjour,
je voudrais réécrire une url de la forme
http://site.com/index.php?page=xxx en http://site.com/xxx/
la règle suivante fonctionne sous EasyPHP 1.8
mais elle ne fonctionne pas sous Apache2 ou chez OVH
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^(.+)/$ index.php?page=$1 [L]
Extrait des logs sous apache2
add path info postfix: /var/www/histoire.php -> /var/www/histoire.php/
strip per-dir prefix: /var/www/histoire.php/ -> histoire.php/
applying pattern '^(.+)/$' to uri 'histoire.php/'
rewrite 'partenaires.php/' -> 'index.php?page=histoire.php/'
split uri=index.php?page=histoire.php/ -> uri=index.php, args=page=histoire.php/
Extrait des logs sous EasyPHP
add path-info postfix: c:/program files/easyphp1-8/www/histoire -> c:/program files/easyphp1-8/www/histoire/
strip per-dir prefix: c:/program files/easyphp1-8/www/histoire/ -> histoire/
applying pattern '^(.+)/$' to uri 'histoire/'
rewrite histoire/ -> index.php?page=histoire
split uri=index.php?page=histoire -> uri=index.php, args=page=histoire
1ère Question: Comment enlever l'extension de l'url rewriting qui est automatiquement ajoutée
2ème Question: Comment faire fonctionner ces deux formes d'url http://site.com/xxx/ & http://site.com/xxx
Merci d'avance
je voudrais réécrire une url de la forme
http://site.com/index.php?page=xxx en http://site.com/xxx/
la règle suivante fonctionne sous EasyPHP 1.8
mais elle ne fonctionne pas sous Apache2 ou chez OVH
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^(.+)/$ index.php?page=$1 [L]
Extrait des logs sous apache2
add path info postfix: /var/www/histoire.php -> /var/www/histoire.php/
strip per-dir prefix: /var/www/histoire.php/ -> histoire.php/
applying pattern '^(.+)/$' to uri 'histoire.php/'
rewrite 'partenaires.php/' -> 'index.php?page=histoire.php/'
split uri=index.php?page=histoire.php/ -> uri=index.php, args=page=histoire.php/
Extrait des logs sous EasyPHP
add path-info postfix: c:/program files/easyphp1-8/www/histoire -> c:/program files/easyphp1-8/www/histoire/
strip per-dir prefix: c:/program files/easyphp1-8/www/histoire/ -> histoire/
applying pattern '^(.+)/$' to uri 'histoire/'
rewrite histoire/ -> index.php?page=histoire
split uri=index.php?page=histoire -> uri=index.php, args=page=histoire
1ère Question: Comment enlever l'extension de l'url rewriting qui est automatiquement ajoutée
2ème Question: Comment faire fonctionner ces deux formes d'url http://site.com/xxx/ & http://site.com/xxx
Merci d'avance
