PAGAU5 Posted January 26, 2021 Share Posted January 26, 2021 Bonjour, Hébergé chez OVH (je sais, mais pas le choix), J'ai deux nom de domaine un en .shop et l'autre en .fr, le principal étant le .shop, je voudrai faire une redirection du point shop au point fr. Peut on trouver un Tuto simple pour faire pointer sur les 2 noms de Domaine? ma dernière tentative à tout mis en vrac et j'ai du tout recommencer. Merci pour une solution simple si possible. Link to comment Share on other sites More sharing options...
solsol69 Posted January 26, 2021 Share Posted January 26, 2021 (edited) bonjour Modifier ou créer votre fichier .htaccess sur le .shop situé a la racine de votre serveur , en plaçant dedans RedirectPermanent / http://www.mon-site.shop/ Edited January 26, 2021 by solsol69 (see edit history) Link to comment Share on other sites More sharing options...
PAGAU5 Posted January 26, 2021 Author Share Posted January 26, 2021 Ok mais je le place à quel niveau du fichier il y a 52 minutes, solsol69 a dit : bonjour Modifier ou créer votre fichier .htaccess sur le .shop situé a la racine de votre serveur , en plaçant dedans RedirectPermanent / http://www.mon-site.shop/ Link to comment Share on other sites More sharing options...
PAGAU5 Posted January 26, 2021 Author Share Posted January 26, 2021 je le place ou dans le fichier .htaccess? Link to comment Share on other sites More sharing options...
PAGAU5 Posted January 26, 2021 Author Share Posted January 26, 2021 Mon site étant en https il n'y aucune incidence dans les ligne à ajouter ? Link to comment Share on other sites More sharing options...
solsol69 Posted January 26, 2021 Share Posted January 26, 2021 il y a 2 minutes, PAGAU5 a dit : Ok mais je le place à quel niveau du fichier dans le dossier www il y a 1 minute, PAGAU5 a dit : je le place ou dans le fichier .htaccess? Moi mon .htacces ne contient que la redirection. Link to comment Share on other sites More sharing options...
PAGAU5 Posted January 26, 2021 Author Share Posted January 26, 2021 Moi j'ai déjà tout ça # ~~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 #Domain: natvida.shop RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] # Images RewriteCond %{HTTP_HOST} ^natvida.shop$ RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^natvida.shop$ RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] RewriteCond %{HTTP_HOST} ^natvida.shop$ RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] RewriteCond %{HTTP_HOST} ^natvida.shop$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] RewriteCond %{HTTP_HOST} ^natvida.shop$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] RewriteCond %{HTTP_HOST} ^natvida.shop$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] RewriteCond %{HTTP_HOST} ^natvida.shop$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] RewriteCond %{HTTP_HOST} ^natvida.shop$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L] RewriteCond %{HTTP_HOST} ^natvida.shop$ RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^natvida.shop$ RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L] # AlphaImageLoader for IE and fancybox RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L] # Dispatcher RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L] </IfModule> AddType application/vnd.ms-fontobject .eot AddType font/ttf .ttf AddType font/otf .otf AddType application/font-woff .woff AddType font/woff2 .woff2 <IfModule mod_headers.c> <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|svg)$"> Header set Access-Control-Allow-Origin "*" </FilesMatch> <FilesMatch "\.pdf$"> Header set Content-Disposition "Attachment" Header set X-Content-Type-Options "nosniff" </FilesMatch> </IfModule> <Files composer.lock> # Apache 2.2 <IfModule !mod_authz_core.c> Order deny,allow Deny from all </IfModule> # Apache 2.4 <IfModule mod_authz_core.c> Require all denied </IfModule> </Files> #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 Link to comment Share on other sites More sharing options...
solsol69 Posted January 26, 2021 Share Posted January 26, 2021 rajouter le "s" Link to comment Share on other sites More sharing options...
solsol69 Posted January 26, 2021 Share Posted January 26, 2021 Logiquement vous n'avez plus besoin de tous ca . ( Au cas ou ) renommer votre ancien .htaccess et remplacer le par le nouveau Link to comment Share on other sites More sharing options...
solsol69 Posted January 26, 2021 Share Posted January 26, 2021 (edited) Il y a 3 heures, PAGAU5 a dit : Peut on trouver un Tuto simple pour faire pointer sur les 2 noms de Domaine? Désolé mais En fait je viens de relire votre question mais je pense ne pas avoir compris le sens de votre question. Replacer l'ancien .htaccess sur votre serveur et suivez ce tuto https://docs.ovh.com/fr/domains/redirection-nom-de-domaine/ Edited January 26, 2021 by solsol69 (see edit history) Link to comment Share on other sites More sharing options...
PAGAU5 Posted January 26, 2021 Author Share Posted January 26, 2021 Je vais regarder, je viens juste de tout remettre en place tout avait planté. Merci bonne soirée Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now