ifts78 Posted August 23, 2013 Share Posted August 23, 2013 Hello, the question is simple: I simply changed the domain name of my site from www.piacersiwedding.com to www.eyeshadowandnail.com without changing hosting and content (ie ... I just changed the domain name!). I think if I wanted to redirect all links already indexed by google with the old domain should I do a 301 redirect. What are the changes I can do? thanks Link to comment Share on other sites More sharing options...
NemoPS Posted August 23, 2013 Share Posted August 23, 2013 You need to leave some php page to that old address for each indexed page, or prestashop itself, then, at the beginning of each page, or in the index.php file of prestashop, add Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.new-url.com" ); If you feel braver, try using htaccess as described here http://www.webconfs....t-a-webpage.php Link to comment Share on other sites More sharing options...
ifts78 Posted August 23, 2013 Author Share Posted August 23, 2013 Thank you for your reply, but nothing happens! The old domain (www.piacersiwedding.com) don't redirects in the new domain (www.eyeshadowandnail.com). This is a piece of my .htaccess file: <IfModule mod_rewrite.c> # URL rewriting module activation RewriteEngine on RewriteCond %{HTTP_HOST} ^piacersiwedding.com$ [OR] RewriteCond %{HTTP_HOST} ^www.piacersiwedding.com$$ RewriteRule (.*)$ http://www.eyeshadowandnail.com/$1 [R=301,L] # URL rewriting rules RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$1$2.jpg [L] RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$1$2$3.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$1$2$3$4.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg [L] RewriteRule ^c/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/c/$1$2.jpg [L] RewriteRule ^c/([a-zA-Z-]+)/[a-zA-Z0-9-]+\.jpg$ /img/c/$1.jpg [L] RewriteRule ^([a-z]{2})/[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$2&isolang=$1 [QSA,L] RewriteRule ^([a-z]{2})/([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$2&isolang=$1 [QSA,L] RewriteRule ^([a-z]{2})/([0-9]+)\-[a-zA-Z0-9-]*(/[a-zA-Z0-9-]*)+ /category.php?id_category=$2&isolang=$1&noredirect=1 [QSA,L] RewriteRule ^([a-z]{2})/([0-9]+)\-[a-zA-Z0-9-]* /category.php?id_category=$2&isolang=$1 [QSA,L] RewriteRule ^([a-z]{2})/content/([0-9]+)\-[a-zA-Z0-9-]* /cms.php?isolang=$1&id_cms=$2 [QSA,L] RewriteRule ^([a-z]{2})/content/category/([0-9]+)\-[a-zA-Z0-9-]* /cms.php?isolang=$1&id_cms_category=$2 [QSA,L] RewriteRule ^([a-z]{2})/([0-9]+)__[a-zA-Z0-9-]* /supplier.php?isolang=$1&id_supplier=$2 [QSA,L] RewriteRule ^([a-z]{2})/([0-9]+)_[a-zA-Z0-9-]* /manufacturer.php?isolang=$1&id_manufacturer=$2 [QSA,L] RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/c/$1$2.jpg [L] RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L] RewriteRule ^[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L] RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*(/[a-zA-Z0-9-]*)+ /category.php?id_category=$1&noredirect=1 [QSA,L] RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]* /category.php?id_category=$1 [QSA,L] RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*) /supplier.php?id_supplier=$1 [QSA,L] RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*) /manufacturer.php?id_manufacturer=$1 [QSA,L] RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms=$1 [QSA,L] RewriteRule ^content/category/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms_category=$1 [QSA,L] RewriteRule ^en/page-not-found$ /404.php?isolang=en [QSA,L] RewriteRule ^en/address$ /address.php?isolang=en [QSA,L] RewriteRule ^en/addresses$ /addresses.php?isolang=en [QSA,L] RewriteRule ^en/authentication$ /authentication.php?isolang=en [QSA,L] RewriteRule ^en/best-sales$ /best-sales.php?isolang=en [QSA,L] RewriteRule ^en/cart$ /cart.php?isolang=en [QSA,L] RewriteRule ^en/contact-us$ /contact-form.php?isolang=en [QSA,L] RewriteRule ^en/discount$ /discount.php?isolang=en [QSA,L] RewriteRule ^en/guest-tracking$ /guest-tracking.php?isolang=en [QSA,L] RewriteRule ^en/order-history$ /history.php?isolang=en [QSA,L] RewriteRule ^en/identity$ /identity.php?isolang=en [QSA,L] RewriteRule ^en/manufacturers$ /manufacturer.php?isolang=en [QSA,L] RewriteRule ^en/my-account$ /my-account.php?isolang=en [QSA,L] RewriteRule ^en/new-products$ /new-products.php?isolang=en [QSA,L] RewriteRule ^en/order$ /order.php?isolang=en [QSA,L] RewriteRule ^en/order-follow$ /order-follow.php?isolang=en [QSA,L] RewriteRule ^en/quick-order$ /order-opc.php?isolang=en [QSA,L] RewriteRule ^en/order-slip$ /order-slip.php?isolang=en [QSA,L] RewriteRule ^en/password-recovery$ /password.php?isolang=en [QSA,L] RewriteRule ^en/prices-drop$ /prices-drop.php?isolang=en [QSA,L] RewriteRule ^en/search$ /search.php?isolang=en [QSA,L] RewriteRule ^en/sitemap$ /sitemap.php?isolang=en [QSA,L] RewriteRule ^en/stores$ /stores.php?isolang=en [QSA,L] RewriteRule ^en/supplier$ /supplier.php?isolang=en [QSA,L] RewriteRule ^en$ /en/ [QSA,L] RewriteRule ^en/([^?&]*)$ /$1?isolang=en [QSA,L] RewriteRule ^fr/page-non-trouvee$ /404.php?isolang=fr [QSA,L] RewriteRule ^fr/adresse$ /address.php?isolang=fr [QSA,L] RewriteRule ^fr/adresses$ /addresses.php?isolang=fr [QSA,L] RewriteRule ^fr/authentification$ /authentication.php?isolang=fr [QSA,L] RewriteRule ^fr/meilleures-ventes$ /best-sales.php?isolang=fr [QSA,L] RewriteRule ^fr/panier$ /cart.php?isolang=fr [QSA,L] RewriteRule ^fr/contactez-nous$ /contact-form.php?isolang=fr [QSA,L] RewriteRule ^fr/bons-de-reduction$ /discount.php?isolang=fr [QSA,L] RewriteRule ^fr/suivi-commande-invite$ /guest-tracking.php?isolang=fr [QSA,L] RewriteRule ^fr/historique-des-commandes$ /history.php?isolang=fr [QSA,L] RewriteRule ^fr/identite$ /identity.php?isolang=fr [QSA,L] RewriteRule ^fr/fabricants$ /manufacturer.php?isolang=fr [QSA,L] RewriteRule ^fr/mon-compte$ /my-account.php?isolang=fr [QSA,L] RewriteRule ^fr/nouveaux-produits$ /new-products.php?isolang=fr [QSA,L] RewriteRule ^fr/commande$ /order.php?isolang=fr [QSA,L] RewriteRule ^fr/details-de-la-commande$ /order-follow.php?isolang=fr [QSA,L] RewriteRule ^fr/commande-rapide$ /order-opc.php?isolang=fr [QSA,L] RewriteRule ^fr/avoirs$ /order-slip.php?isolang=fr [QSA,L] RewriteRule ^fr/mot-de-passe-oublie$ /password.php?isolang=fr [QSA,L] RewriteRule ^fr/promotions$ /prices-drop.php?isolang=fr [QSA,L] RewriteRule ^fr/recherche$ /search.php?isolang=fr [QSA,L] RewriteRule ^fr/plan-du-site$ /sitemap.php?isolang=fr [QSA,L] RewriteRule ^fr/magasins$ /stores.php?isolang=fr [QSA,L] RewriteRule ^fr/fournisseurs$ /supplier.php?isolang=fr [QSA,L] RewriteRule ^fr$ /fr/ [QSA,L] RewriteRule ^fr/([^?&]*)$ /$1?isolang=fr [QSA,L] RewriteRule ^es/pagina-no-encuentra$ /404.php?isolang=es [QSA,L] RewriteRule ^es/direccion$ /address.php?isolang=es [QSA,L] RewriteRule ^es/direcciones$ /addresses.php?isolang=es [QSA,L] RewriteRule ^es/autenticacion$ /authentication.php?isolang=es [QSA,L] RewriteRule ^es/mas-vendidos$ /best-sales.php?isolang=es [QSA,L] RewriteRule ^es/carro-de-la-compra$ /cart.php?isolang=es [QSA,L] RewriteRule ^es/contactenos$ /contact-form.php?isolang=es [QSA,L] RewriteRule ^es/descuento$ /discount.php?isolang=es [QSA,L] RewriteRule ^es/estado-pedido$ /guest-tracking.php?isolang=es [QSA,L] RewriteRule ^es/historial-de-pedidos$ /history.php?isolang=es [QSA,L] RewriteRule ^es/identidad$ /identity.php?isolang=es [QSA,L] RewriteRule ^es/fabricantes$ /manufacturer.php?isolang=es [QSA,L] RewriteRule ^es/mi-cuenta$ /my-account.php?isolang=es [QSA,L] RewriteRule ^es/nuevos-productos$ /new-products.php?isolang=es [QSA,L] RewriteRule ^es/carrito$ /order.php?isolang=es [QSA,L] RewriteRule ^es/devolucion-de-productos$ /order-follow.php?isolang=es [QSA,L] RewriteRule ^es/pedido-rapido$ /order-opc.php?isolang=es [QSA,L] RewriteRule ^es/vales$ /order-slip.php?isolang=es [QSA,L] RewriteRule ^es/contrasena-olvidado$ /password.php?isolang=es [QSA,L] RewriteRule ^es/ofertas$ /prices-drop.php?isolang=es [QSA,L] RewriteRule ^es/buscar$ /search.php?isolang=es [QSA,L] RewriteRule ^es/mapa-del-sitio$ /sitemap.php?isolang=es [QSA,L] RewriteRule ^es/tiendas$ /stores.php?isolang=es [QSA,L] RewriteRule ^es/proveedores$ /supplier.php?isolang=es [QSA,L] RewriteRule ^es$ /es/ [QSA,L] RewriteRule ^es/([^?&]*)$ /$1?isolang=es [QSA,L] RewriteRule ^de/seite-nicht-gefunden$ /404.php?isolang=de [QSA,L] RewriteRule ^de/adresse$ /address.php?isolang=de [QSA,L] RewriteRule ^de/adressen$ /addresses.php?isolang=de [QSA,L] RewriteRule ^de/authentifizierung$ /authentication.php?isolang=de [QSA,L] RewriteRule ^de/besten-verkaufe$ /best-sales.php?isolang=de [QSA,L] RewriteRule ^de/warenkorb$ /cart.php?isolang=de [QSA,L] RewriteRule ^de/kontaktieren-sie-uns$ /contact-form.php?isolang=de [QSA,L] RewriteRule ^de/discount$ /discount.php?isolang=de [QSA,L] RewriteRule ^de/auftragsverfolgung-gast$ /guest-tracking.php?isolang=de [QSA,L] RewriteRule ^de/bestellungsverlauf$ /history.php?isolang=de [QSA,L] RewriteRule ^de/kennung$ /identity.php?isolang=de [QSA,L] RewriteRule ^de/hersteller$ /manufacturer.php?isolang=de [QSA,L] RewriteRule ^de/mein-Konto$ /my-account.php?isolang=de [QSA,L] RewriteRule ^de/neue-Produkte$ /new-products.php?isolang=de [QSA,L] RewriteRule ^de/bestellung$ /order.php?isolang=de [QSA,L] RewriteRule ^de/bestellungsverfolgung$ /order-follow.php?isolang=de [QSA,L] RewriteRule ^de/schnell-bestellung$ /order-opc.php?isolang=de [QSA,L] RewriteRule ^de/bestellschein$ /order-slip.php?isolang=de [QSA,L] RewriteRule ^de/kennwort-wiederherstellung$ /password.php?isolang=de [QSA,L] RewriteRule ^de/angebote$ /prices-drop.php?isolang=de [QSA,L] RewriteRule ^de/suche$ /search.php?isolang=de [QSA,L] RewriteRule ^de/sitemap$ /sitemap.php?isolang=de [QSA,L] RewriteRule ^de/shops$ /stores.php?isolang=de [QSA,L] RewriteRule ^de/zulieferer$ /supplier.php?isolang=de [QSA,L] RewriteRule ^de$ /de/ [QSA,L] RewriteRule ^de/([^?&]*)$ /$1?isolang=de [QSA,L] RewriteRule ^it/pagina-non-trovata$ /404.php?isolang=it [QSA,L] RewriteRule ^it/indirizzo$ /address.php?isolang=it [QSA,L] RewriteRule ^it/indirizzi$ /addresses.php?isolang=it [QSA,L] RewriteRule ^it/autenticazione$ /authentication.php?isolang=it [QSA,L] RewriteRule ^it/prodotti-piu-venduti$ /best-sales.php?isolang=it [QSA,L] RewriteRule ^it/carrello$ /cart.php?isolang=it [QSA,L] RewriteRule ^it/contattaci$ /contact-form.php?isolang=it [QSA,L] RewriteRule ^it/sconto$ /discount.php?isolang=it [QSA,L] RewriteRule ^it/ospite-monitoraggio$ /guest-tracking.php?isolang=it [QSA,L] RewriteRule ^it/storico-ordine$ /history.php?isolang=it [QSA,L] RewriteRule ^it/identita$ /identity.php?isolang=it [QSA,L] RewriteRule ^it/produttori$ /manufacturer.php?isolang=it [QSA,L] RewriteRule ^it/il-mio-account$ /my-account.php?isolang=it [QSA,L] RewriteRule ^it/nuovi-prodotti$ /new-products.php?isolang=it [QSA,L] RewriteRule ^it/ordine$ /order.php?isolang=it [QSA,L] RewriteRule ^it/seguito-ordine$ /order-follow.php?isolang=it [QSA,L] RewriteRule ^it/ordine-veloce$ /order-opc.php?isolang=it [QSA,L] RewriteRule ^it/nota-di-ordine$ /order-slip.php?isolang=it [QSA,L] RewriteRule ^it/password-recupero$ /password.php?isolang=it [QSA,L] RewriteRule ^it/offerte-speciali$ /prices-drop.php?isolang=it [QSA,L] RewriteRule ^it/cerca$ /search.php?isolang=it [QSA,L] RewriteRule ^it/sitemap$ /sitemap.php?isolang=it [QSA,L] RewriteRule ^it/negozi$ /stores.php?isolang=it [QSA,L] RewriteRule ^it/fornitore$ /supplier.php?isolang=it [QSA,L] RewriteRule ^it$ /it/ [QSA,L] RewriteRule ^it/([^?&]*)$ /$1?isolang=it [QSA,L] Link to comment Share on other sites More sharing options...
El Patron Posted August 23, 2013 Share Posted August 23, 2013 try this Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTP_HOST} ^olddomain.com [NC] RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301] RewriteCond %{HTTP_HOST} ^www.olddomain.com [NC] RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301] Link to comment Share on other sites More sharing options...
ifts78 Posted August 25, 2013 Author Share Posted August 25, 2013 Nothing!!! Is necessary to activate something in the server configuration? Thanks Link to comment Share on other sites More sharing options...
El Patron Posted August 25, 2013 Share Posted August 25, 2013 is this an IIS server? Link to comment Share on other sites More sharing options...
ifts78 Posted August 26, 2013 Author Share Posted August 26, 2013 Apache server Link to comment Share on other sites More sharing options...
El Patron Posted August 26, 2013 Share Posted August 26, 2013 wow...and you have friendly urls enabled and see them in the front office? i.e. mod_rewrite module is active on your server? Link to comment Share on other sites More sharing options...
NemoPS Posted August 26, 2013 Share Posted August 26, 2013 You can also check for mod_rewrite in your phpinfo(), to see if it's properly installed Link to comment Share on other sites More sharing options...
El Patron Posted August 26, 2013 Share Posted August 26, 2013 thanks nemo1...I've given up...jajajajaja Link to comment Share on other sites More sharing options...
NemoPS Posted August 26, 2013 Share Posted August 26, 2013 I won't give up! .... maybe Link to comment Share on other sites More sharing options...
ifts78 Posted August 28, 2013 Author Share Posted August 28, 2013 Yes, mod_rewrite installed! Link to comment Share on other sites More sharing options...
El Patron Posted August 28, 2013 Share Posted August 28, 2013 nemo1...what say you? Link to comment Share on other sites More sharing options...
NemoPS Posted August 28, 2013 Share Posted August 28, 2013 You already tried with this, correct? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.new-url.com" ); Link to comment Share on other sites More sharing options...
ifts78 Posted August 29, 2013 Author Share Posted August 29, 2013 No, where should I put that code? ...old and new domain are in the same server Link to comment Share on other sites More sharing options...
ifts78 Posted August 31, 2013 Author Share Posted August 31, 2013 up! Link to comment Share on other sites More sharing options...
ifts78 Posted September 3, 2013 Author Share Posted September 3, 2013 You already tried with this, correct? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.new-url.com" ); Where should I put that code? Thanks Link to comment Share on other sites More sharing options...
NemoPS Posted September 3, 2013 Share Posted September 3, 2013 Well, you can try adding that to index.php itself, for example. Just to test if php redirection works Link to comment Share on other sites More sharing options...
J.Sahu Posted September 3, 2013 Share Posted September 3, 2013 I'm not sure but you can change all the urls to new site in a very simple way just try and analyze (I'm a newbie ) #you can add these lines in the old domains root .htaccess file #put these lines above all lines or simply keep these lines only Options +FollowSymlinks RewriteEngine On RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L] #or for specific sub branches RewriteRule ^something/(.*)$ http://newdomain.com/something/$1 [R=301,L] 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