Jump to content

[Résolu] Réécriture urls chez 1and1 ... j'y arrive pô !


Recommended Posts

Bonjour à tous.

 

Après avoir passé des heures à tout lire sur le problème de rewriting chez 1and1 et après les avoir contactés (sans réponse), je me tourne deséspérément vers vous.

 

Quand j'active la réécriture, j'ai une page d'accueil sans les photos et quand je clique sur un produit, j'arrive sur une page blanche d'erreur.

 

Je suis sous presta 1.5.6.1 et mon htaccess ressemble à ça :

 

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

# URL rewriting module activation
Options +FollowSymLinks -MultiViews
RewriteEngine on
RewriteBase /

#RewriteBase /maisonmarine/

# URL rewriting rules
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2$3.jpg [L,E]
RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg [L,E]
RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$3&isolang=$1$5 [L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2&isolang=$1$4 [L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$2&isolang=$1 [QSA,L,E]
RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2$4 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$1$3 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$1 [QSA,L,E]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /cms.php?id_cms=$1 [QSA,L,E]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ /supplier.php?id_supplier=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ /manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]
RewriteRule ^lang-([a-z]{2})/(.*)$ /$2?isolang=$1 [QSA,L,E]

# Catch 404 errors
ErrorDocument 404 /404.php

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.maisonmarine.com$
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^www.maisonmarine.com$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
</IfModule>

#If rewrite mod isn't enabled
ErrorDocument 404 /index.php?controller=404

# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

 

Si quelqu'un avait une idée lumineuse, ça m'aiderait énormément car j'ai des gros problèmes de référencement, du coup.

 

Ah oui, j'oubliais : à coté du bouton pour activer le rewriting dans le B.O, j'ai cette charmante phrase :

 

Le mode de réécriture d'URL (mod_rewrite) n'est pas activé sur votre serveur, ou il est impossible de vérifier la configuration. Pour utiliser les URLs réécrites, vous devez activer ce mode.

 

merci d'avance pour votre aide

Edited by bamboche (see edit history)
Link to comment
Share on other sites

Oups ! autant pour moi !

Effectivement, une fois nettoyé, ça fonctionne parfaitement. J'ai honte !

 

Sinon, j'ai une autre question en rapport : pour le référencement, vaut-il mieux écrire une url simplifiée du type "mon-objet" ou "mon_objet" ? ou bien cela n'a aucune importance ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...