DavidTech Posted August 18, 2017 Share Posted August 18, 2017 (edited) When i go to the new url: http://calcemi.com it redirects in some way to localhost/prestashop. I think it is not a server error but somethinh on the prestashop files, i looked the db from top to bottom and i don't see any configuration beside the one which mentions the prestashop migrating tutorial (already modified).I migrated my prestashop (v1.7.1.2) from localhost/prestashop/ to my new VPS and did all the steps to migrate the prestashop on this post https://www.prestashop.com/en/blog/how-to-migrate-prestashop-to-a-new-server including the database modifications. Edited August 18, 2017 by DavidTech (see edit history) Link to comment Share on other sites More sharing options...
Scully Posted August 18, 2017 Share Posted August 18, 2017 Use the forum search. I have already answered this exact question two times only during this week. Look for ps_shop_url and .htaccess. Link to comment Share on other sites More sharing options...
DavidTech Posted August 19, 2017 Author Share Posted August 19, 2017 Use the forum search. I have already answered this exact question two times only during this week. Look for ps_shop_url and .htaccess. Thank you very much scully for letting me know this problem has already been solved by someone else, could you provide me the link to one of those questions since i did not find them ;( Link to comment Share on other sites More sharing options...
DavidTech Posted August 19, 2017 Author Share Posted August 19, 2017 Guys as @Scully said, i need to search for the ps_shop_url table in the database, but i cannot find it. So i suppose the error is on the .htaccess file, can someone check where is the error on my .htaccess file for the new calcemi.com domain? *The code of the .htaccess file is below. # ~~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: localhost RewriteRule . - [E=REWRITEBASE:/prestashop/] RewriteRule ^api$ api/ [L] RewriteRule ^api/(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] # Images RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] 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] 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] 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] 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] 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] 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] RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] 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 application/font-woff2 .woff2 <IfModule mod_headers.c> <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|svg)$"> Header set Access-Control-Allow-Origin "*" </FilesMatch> </IfModule> #If rewrite mod isn't enabled ErrorDocument 404 /prestashop/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...
Scully Posted August 19, 2017 Share Posted August 19, 2017 https://www.prestashop.com/forums/topic/619774-change-domain-name-of-shop-directly-in-database-v-17/ Link to comment Share on other sites More sharing options...
DavidTech Posted August 19, 2017 Author Share Posted August 19, 2017 https://www.prestashop.com/forums/topic/619774-change-domain-name-of-shop-directly-in-database-v-17/ On this post doesn't show what to change on the .htaccess file, what should i modify on it? Link to comment Share on other sites More sharing options...
Scully Posted August 19, 2017 Share Posted August 19, 2017 When I refer to table names, I always use ps_ as prefix. It might be different in your installation, but ps_ is the default table prefix. The URL is stored in ps_shop_url as well as in ps_configuration table. Usually it is set by the SEO & URL settings from the backoffice. Only if the backoffice dosen't work for any reason we change it directly in the db. After that we check that the .htaccess for apache or the corresponding file for nginx has been updated. Link to comment Share on other sites More sharing options...
Scully Posted August 23, 2017 Share Posted August 23, 2017 DavidTech - is your problem solved? A feedback would be appreciated. Link to comment Share on other sites More sharing options...
Famke Posted August 27, 2020 Share Posted August 27, 2020 (edited) I know this is marked as solved, I searched for many topics with same problem. I'm already searching a few days for a solution and I'm stuck. My shop was made with xampp localhost and now I use FTP and have placed it online. I changed ps_configuration and .htaccess but BO doesn't work and the normal URL redirects me to www/localhost --' Edited August 27, 2020 by Famke (see edit history) Link to comment Share on other sites More sharing options...
JBW Posted August 27, 2020 Share Posted August 27, 2020 In 1.7. you have to change ps_shop_url table as well. Link to comment Share on other sites More sharing options...
Famke Posted August 27, 2020 Share Posted August 27, 2020 33 minutes ago, JBW said: In 1.7. you have to change ps_shop_url table as well. This saved me! Thanks a lot! Link to comment Share on other sites More sharing options...
aleksanderali Posted January 21, 2021 Share Posted January 21, 2021 On 8/27/2020 at 4:42 PM, Famke said: This saved me! Thanks a lot! On 8/27/2020 at 4:09 PM, JBW said: In 1.7. you have to change ps_shop_url table as well. This saved me as well thanks! 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