MrBaseball34 Posted July 22, 2011 Share Posted July 22, 2011 I am using a WAMP setup, documentroot = g:\wamp\www PS installed in folder g:\wamp\www\prestashop_1.4.1 When I type in http://localhost/prestashop_1.4.1, it redirects me to http://www.mystore.com/prestashop_1.4.1/en (mystore.com is not my real url) I have this in settings.inc.php: define('__PS_BASE_URI__', '/prestashop_1.4.1/'); I have: PS_SHOP_DOMAIN = /localhost/prestashop_1.4.1 PS_SHOP_DOMAIN_SSL = /localhost/prestashop_1.4.1 NO .htaccess file in store directory. Searched for instances of mystore.com in all php files in directory tree, none found. Searched every table in DB, no instances found. Even when I type in http://127.0.0.1/prestashop_1.4.1, it redirects me to the same thing as above. Funny thing is, if I want to access the BO, this URL works with no redirection: http://localhost/prestashop_1.4.1/store_admin What the heck else should I check to be able to run this thing on localhost? I'm pulling out the rest of my hair, I can't think of anything else and I need to know this like NOW!!! Link to comment Share on other sites More sharing options...
Raphaël Malié Posted July 22, 2011 Share Posted July 22, 2011 Hi, open your file c:\windows\system32\drivers\etc\host and check that you have the line uncommented : 127.0.0.1 localhost Link to comment Share on other sites More sharing options...
MrBaseball34 Posted July 25, 2011 Author Share Posted July 25, 2011 Hi, open your file c:windowssystem32driversetchost and check that you have the line uncommented :<br/> 127.0.0.1 localhost It is just fine, if it was not correct, I wouldn't be able to access the BO. Link to comment Share on other sites More sharing options...
shokinro Posted July 25, 2011 Share Posted July 25, 2011 is the database you running on restored from bakcup which was running at "http://www.mystore.c...tashop_1.4.1/" before? In that case, you need to change the domain name in the datbase table ps_configuration check my blof here for more details Link to comment Share on other sites More sharing options...
MrBaseball34 Posted August 17, 2011 Author Share Posted August 17, 2011 is the database you running on restored from bakcup which was running at "http://www.mystore.c...tashop_1.4.1/" before? In that case, you need to change the domain name in the datbase table ps_configuration check my blof here for more details I have (in the database): PS_SHOP_DOMAIN = /localhost/prestashop_1.4.1 PS_SHOP_DOMAIN_SSL = /localhost/prestashop_1.4.1 Link to comment Share on other sites More sharing options...
shokinro Posted August 17, 2011 Share Posted August 17, 2011 I have (in the database):PS_SHOP_DOMAIN = /localhost/prestashop_1.4.1 PS_SHOP_DOMAIN_SSL = /localhost/prestashop_1.4.1 Domain name should only contain the domain name part, not include the virtual directory. So in your case it should be in database PS_SHOP_DOMAIN localhostPS_SHOP_DOMAIN_SSL ocalhost Link to comment Share on other sites More sharing options...
MrBaseball34 Posted August 19, 2011 Author Share Posted August 19, 2011 Tried that too with same results. Link to comment Share on other sites More sharing options...
Arafat Jahan Posted August 19, 2011 Share Posted August 19, 2011 Hi, try to go "Back Office>Preferences>SEO & URLs" then scroll down and find the tab "URLs Setup" in this section you need to define your:- PS directory = /prestashop_1.4.1/ Homepage file = index.php Shop domain name = http://localhost/prestashop_1.4.1 Shop domain name for SSL = https://localhost/prestashop_1.4.1 Please be confirm that you delete your .htaccess file from ROOT folder /prestashop_1.4.1/ when you are in local server, [be sure backup your .htaccess file before delete] May be it will help, also be sure to turn off friendly-url when you are on your local server. If it solve your problem then please mark the post as [sOLVED] as other people can get help thanks, Arafat Jahan I am using a WAMP setup, documentroot = g:\wamp\www PS installed in folder g:\wamp\www\prestashop_1.4.1 When I type in http://localhost/prestashop_1.4.1, it redirects me to http://www.mystore.com/prestashop_1.4.1/en (mystore.com is not my real url) I have this in settings.inc.php: define('__PS_BASE_URI__', '/prestashop_1.4.1/'); I have: PS_SHOP_DOMAIN = /localhost/prestashop_1.4.1 PS_SHOP_DOMAIN_SSL = /localhost/prestashop_1.4.1 NO .htaccess file in store directory. Searched for instances of mystore.com in all php files in directory tree, none found. Searched every table in DB, no instances found. Even when I type in http://127.0.0.1/prestashop_1.4.1, it redirects me to the same thing as above. Funny thing is, if I want to access the BO, this URL works with no redirection: http://localhost/prestashop_1.4.1/store_admin What the heck else should I check to be able to run this thing on localhost? I'm pulling out the rest of my hair, I can't think of anything else and I need to know this like NOW!!! 1 Link to comment Share on other sites More sharing options...
shykoo Posted September 25, 2011 Share Posted September 25, 2011 I have the same issue. this post has the [solved] mark, but though i have tried everything suggested, including the final post by Arafat Jahan, I am still redirected to the live URL of myshop. In BO>SEO&URLs i tried all possible combinations, even left it blank, but still nothing. What the NECK!!! MrBaseball34 - how did u solve it??? Link to comment Share on other sites More sharing options...
oxyweb Posted September 25, 2011 Share Posted September 25, 2011 shykoo I'm also having the same problem. I didn't what you to think that the end of this paragraph will be an answer so I thought I would but the above disclaimer first! Anyway, I'm having the same problem and I've done exactly what has been mentioned and still no change. It's a bizarre thing! There's no link between the localhost and the onlinestore but still clicking on View My Shop or going to http://localhost/shop will always redirect to my onlinestore. hmmm... anyway if I figure it out I will let you know! BTW Did you clear the cache and cookies in your browser? MrB What did you do?! Link to comment Share on other sites More sharing options...
oxyweb Posted September 25, 2011 Share Posted September 25, 2011 Thank you to Arafat, he had it right! 1. Delete the .htaccess file - don't regenerate it! 2. Set the shop folder like this: 3. After this, test the site and regenerate the htaccess file if you wish (it did work for me). 4. Switch Friendly URL back on and regenerate the ht access file and it will work jsut as the online site. 1 Link to comment Share on other sites More sharing options...
MrBaseball34 Posted September 25, 2011 Author Share Posted September 25, 2011 I solved it by rebuilding my store. I got tired of waiting for a correct solution. Faster, sometimes, to start from square one. Link to comment Share on other sites More sharing options...
Guest Posted January 2, 2012 Share Posted January 2, 2012 Hi there, I am having the same problem on my PS 1.4.6, It was okay before I tried to use the Friendly URL on my Localhost's PS. I have tried to changed the URL in ps_configuration and in 'BO-..Shop domain name' to "localhost" and 'localhost/mysite' to no avail. Why is this marked as SOLVED? Link to comment Share on other sites More sharing options...
Guest Posted January 2, 2012 Share Posted January 2, 2012 Thank you to Arafat, he had it right! 1. Delete the .htaccess file - don't regenerate it! 2. Set the shop folder like this: 3. After this, test the site and regenerate the htaccess file if you wish (it did work for me). 4. Switch Friendly URL back on and regenerate the ht access file and it will work jsut as the online site. A little more: Do all the above+remove .htaccess file in your prestashop root + make sure there's no live site url in your database + restart your server(XAMP, WampServer) That's how I fixed this issue on my localhost site. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted January 3, 2012 Author Share Posted January 3, 2012 Why is this marked as SOLVED? Because it was solved. It was *my* post and *I* solved it by rebuilding my store. Link to comment Share on other sites More sharing options...
szepmiki Posted January 12, 2012 Share Posted January 12, 2012 Hi, I've got the same problem (MrBaseball34 #1). My solution was: Add the next line to /etc/hosts file (Ubuntu, but may be similar on other systems): '127.0.0.1 localhost/myprestashopdir myshopdomain' where myshopdomain is the domain name you give "Back Office>Preferences>SEO & URLs> URLs Setup>Shop domain name" In this case you don't need to regenerate .htaccess and not need to do do anything in the shops preferences. Note: if myshopdomain is a live domain you can not reach the live site while this line is in hosts, but works fine when you host your live site on your local machine and you want to access the live site on your localhost Link to comment Share on other sites More sharing options...
tim8nime Posted January 16, 2012 Share Posted January 16, 2012 I had the same problem and I found that just changing values in the database (in the ps_configuration table) did the trick: id_configuration : name = value 178 : PS_SHOP_DOMAIN = localhost 179 : PS_SHOP_DOMAIN_SSL = localhost 216 : REVERSO_ADDRESS = localhost Link to comment Share on other sites More sharing options...
fernandokerber Posted May 30, 2012 Share Posted May 30, 2012 I had the same problem and I found that just changing values in the database (in the ps_configuration table) did the trick: id_configuration : name = value 178 : PS_SHOP_DOMAIN = localhost 179 : PS_SHOP_DOMAIN_SSL = localhost 216 : REVERSO_ADDRESS = localhost THANK YOU! Link to comment Share on other sites More sharing options...
iggywebprom Posted December 30, 2012 Share Posted December 30, 2012 (edited) when copiyng my site (prestashop 1.4) to localhost, I changed in database: PS_SHOP_DOMAIN = localhost PS_SHOP_DOMAIN_SSL = localhost In my shop directory: config/settings.inc.php - first line: define('__PS_BASE_URI__', '/my shop folder name on wamp root/'); Then also disabled .htaccess and in db also set rewrite to 0 PS_REWRITING_SETTINGS = 0 Now it works ok on localhost : Edited December 30, 2012 by iggywebprom (see edit history) 1 Link to comment Share on other sites More sharing options...
robbyahn Posted March 11, 2015 Share Posted March 11, 2015 (edited) Check your database table ps_shop_url and if you use localhost domain | domain_ssl | physical_uri localhost | localhost /mywebsite_foldername/ Edited March 11, 2015 by robbyahn (see edit history) 1 Link to comment Share on other sites More sharing options...
wimpie0050 Posted August 31, 2015 Share Posted August 31, 2015 hello, i have also an redirecting problem. did al this above but stil s my new server: 149.210.180.226 going to the old server place www.mypartsplace.nl and also 149.210.180.226/backoffice is redirecting to the homepage. i changed the domain and domain_ssl in mysql to 149.210.180.226 and also in settings.inc.php : define('__PS_BASE_URI__', '/siteapps/Prestashop-253594/htdocs'); does some have a sollution? thanks in advance Link to comment Share on other sites More sharing options...
ilclaudio Posted August 26, 2016 Share Posted August 26, 2016 (edited) when copiyng my site (prestashop 1.4) to localhost, I changed in database: PS_SHOP_DOMAIN = localhost PS_SHOP_DOMAIN_SSL = localhost In my shop directory: config/settings.inc.php - first line: define('__PS_BASE_URI__', '/my shop folder name on wamp root/'); Then also disabled .htaccess and in db also set rewrite to 0 PS_REWRITING_SETTINGS = 0 Now it works ok on localhost : I'm trying to install locally on my pc the e-commerce: http://my-ecommerce. I've done these configurations: - PS_SHOP_DOMAIN = localhost - PS_SHOP_DOMAIN_SSL = localhost - define('__PS_BASE_URI__', '/my shop folder name on wamp root/'); - removed the file .htaccess in the root folder of the site - PS_REWRITING_SETTINGS = 0 But still the URL http://localhost/prestashop/ it is redirected to http://my-ecommerce. I'm using Prestashop 1.6.1.6, is there a new guide to move locally an ecommerce? So I think this issue is not yet solved. cld Edited August 26, 2016 by ilclaudio (see edit history) Link to comment Share on other sites More sharing options...
ilclaudio Posted August 26, 2016 Share Posted August 26, 2016 I'm trying to install locally on my pc the e-commerce: http://my-ecommerce. I've done these configurations: - PS_SHOP_DOMAIN = localhost - PS_SHOP_DOMAIN_SSL = localhost - define('__PS_BASE_URI__', '/my shop folder name on wamp root/'); - removed the file .htaccess in the root folder of the site - PS_REWRITING_SETTINGS = 0 But still the URL http://localhost/prestashop/ it is redirected to http://my-ecommerce. I'm using Prestashop 1.6.1.6, is there a new guide to move locally an ecommerce? So I think this issue is not yet solved. cld Hi guys, at the end I've solved modifying this table too: Table: ps_shop_url domain --> localhost domain_ssl --> localhost physical_uri --> my-ecommerce Now the site works locally. cld Link to comment Share on other sites More sharing options...
ccw0103 Posted October 5, 2016 Share Posted October 5, 2016 I have all settings correct and I solved by clearing and reseting cookies on my browser.... Link to comment Share on other sites More sharing options...
Famke Posted August 27, 2020 Share Posted August 27, 2020 Is there anyone who can help me out? I'm having the problem that my URL redirects me to localhost, also the BO link does not work.. Already searched and tried a lot! Please help! Link to comment Share on other sites More sharing options...
lussaa Posted July 18, 2021 Share Posted July 18, 2021 I had to change: table ps_configuration: PS_SHOP_DOMAIN, PS_SHOP_DOMAIN_SSL table ps_shop_url: domain , domain_ssl And then go to the back office -> Advanced -> Performance and there click 'Clear cache' to remove all the smarty cached URLs. Link to comment Share on other sites More sharing options...
GLuisier Posted November 1, 2021 Share Posted November 1, 2021 (edited) I've got the same issue trying to install a prestashop site in local (working on prestashop 1.7.4.4). I've modified domain and domain_ssl in ps_configuration and ps_shop_url as well as deactivating friendly urls After all that I cleared the cache. I also deleted .htaccess and remade robots.txt The strange thing is I can access the backoffice on localhost but the website itself redirect me to the web... Edited November 1, 2021 by GLuisier (see edit history) 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