Bonjour,
Je viens de refaire la totalité de mon site en modifiant certain nom de répertoires et de fichiers.
Pour que les liens pointant sur mon site n'arrivent pas sur une erreur 404, j'ai mis un fichier .htaccess à la racine du site avec de nombreux RedirectPermanent (apparemment avec "redirect 301" cela ne fonctionne pas) .
1ère question :
- dois-je mettre un "RedirectPermanent on" en première ligne ?
2ème question :
exemples du fichier actuel :
RedirectPermanent /dossier/ancienpage.html http://www.nomdomaine.com/dossier/
RedirectPermanent /dossier/ancienpage.html http://www.nomdomaine.com/dossier/
RedirectPermanent /dossier/ancienpage.html http://www.nomdomaine.com/dossier/
etc...
- dois-je mettre un [L] à la fin de chaque ligne ?
3ème question :
- j'ai mis en début du fichier .htaccess, les lignes suivantes pour rewriter les adresses sans www.
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^nomdoamine.com$
RewriteRule ^(.*) http://www.nomdoamine.com/$1 [QSA,L,R=301]
y a t-il un conflit avec les redirections permanentes ?
4ème question (oui cela fait bcp
)
serait-il mieux de faire comme ceci ? et quelle différence y a-t-il ?
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^nomdoamine.com$
RewriteRule ^(.*) http://www.nomdoamine.com/$1 [QSA,L,R=301]
RewriteEngine On
RewriteRule ancienpage.html http://www.nomdomaine.com/nouvellepage.html [R=301]
RewriteRule ancienpage.html http://www.nomdomaine.com/nouvellepage.html [R=301]
RewriteRule ancienpage.html http://www.nomdomaine.com/nouvellepage.html [R=301]
etc...
merci infiniment pour votre aide.
cordialement
Je viens de refaire la totalité de mon site en modifiant certain nom de répertoires et de fichiers.
Pour que les liens pointant sur mon site n'arrivent pas sur une erreur 404, j'ai mis un fichier .htaccess à la racine du site avec de nombreux RedirectPermanent (apparemment avec "redirect 301" cela ne fonctionne pas) .
1ère question :
- dois-je mettre un "RedirectPermanent on" en première ligne ?
2ème question :
exemples du fichier actuel :
RedirectPermanent /dossier/ancienpage.html http://www.nomdomaine.com/dossier/
RedirectPermanent /dossier/ancienpage.html http://www.nomdomaine.com/dossier/
RedirectPermanent /dossier/ancienpage.html http://www.nomdomaine.com/dossier/
etc...
- dois-je mettre un [L] à la fin de chaque ligne ?
3ème question :
- j'ai mis en début du fichier .htaccess, les lignes suivantes pour rewriter les adresses sans www.
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^nomdoamine.com$
RewriteRule ^(.*) http://www.nomdoamine.com/$1 [QSA,L,R=301]
y a t-il un conflit avec les redirections permanentes ?
4ème question (oui cela fait bcp

serait-il mieux de faire comme ceci ? et quelle différence y a-t-il ?
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^nomdoamine.com$
RewriteRule ^(.*) http://www.nomdoamine.com/$1 [QSA,L,R=301]
RewriteEngine On
RewriteRule ancienpage.html http://www.nomdomaine.com/nouvellepage.html [R=301]
RewriteRule ancienpage.html http://www.nomdomaine.com/nouvellepage.html [R=301]
RewriteRule ancienpage.html http://www.nomdomaine.com/nouvellepage.html [R=301]
etc...
merci infiniment pour votre aide.
cordialement