Problème avec .htaccess

WRInaute discret
Bjr à tous.

J'ai un soucis avec le .htaccess, dont je n'arrive pas à me servir :oops:
Je suis chez OVH en mutualisé PHP 60Mo pour ce site : inachisio.com

Alors j'ai créé un fichier .htaccess (sans .txt) qui contient ceci :
RewriteRule ^details_([0-9]+)\.html$ details.php?image_id=$1 [L]
RewriteRule ^categories_([0-9]+)\.html$ categories.php?cat_id=$1 [L]
RewriteRule ^postcards_([0-9]+)\.html$ postcards.php?image_id=$1 [L]

Je voudrais donc que la page :
http://www.inachisio.com/details.php?image_id=108

Puisse aussi s'afficher avec l'URL :
http://www.inachisio.com/details_108.html

Mais ca ne marche pas :(

Quelque chose doit manquer non ?
merci
 
A
Anonymous
Guest
Peut être un oubli sur "RewriteEngine"?
Code:
RewriteEngine on
RewriteRule ^details_([0-9]+)\.html$ /details.php?image_id=$1 [L]
RewriteRule ^categories_([0-9]+)\.html$ /categories.php?cat_id=$1 [L] 
RewriteRule ^postcards_([0-9]+)\.html$ /postcards.php?image_id=$1 [L]
 
WRInaute discret
J'ai ajouté cette ligne, sans succès :(

Le .htaccess doit bien se situer dans le répertoire www sous OVH, cad là où est placé le index.php ?
 
A
Anonymous
Guest
Oui le htaccess doit se trouver dans ton cas à la racine du site ainsi que tes scripts php (postcards.php, categories.php, details.php)

Voila se que j'ai avec l'url h**p://www.inachisio.com/details_108.html
Code:
The requested URL /home/inachisi/www/details.php was not found on this server
Précises bien le / dans l'adresse de substitution /details.php?...
Si tu as toujours le problème met ton NDD complet
Code:
rewriteRule ^details_([0-9]+)\.html$ http://www.inachisio.com/details.php?image_id=$1 [L]
 

➡️ Offre MyRankingMetrics ⬅️

pré-audit SEO gratuit avec RM Tech (+ avis d'expert)
coaching offert aux clients (avec Olivier Duffez ou Fabien Faceries)

Voir les détails ici

coaching SEO
Discussions similaires
Haut