Backstory: Today, I was ready to deploy a Prestashop store. But before I put it online, I decided to test something locally. (Something, being: check if our cool AkeebaBackup solution for backing up Prestashop worked).
I almost wish I hadn’t, since I’ve lost almost half an hour trying to figure out why Prestashop kept moaning about redirect errors, Redirect loops and other things about redirecting.
The domain name turned out to be the problem. Since I’m used to Joomla! I’m familiar with a straight forward approach: you enter the full path, and you’re done.
But for Prestashop, you’ve got to change your logic a bit when working on your localhost (be it Wamp, Xamp, LAMP or MAMP). The guide below explains how to setup your domain when you’ve moved your site to your localhost
I am going to make two assumptions: You’ve managed to unpack Prestashop, your database is up and running and you can access the backend locally. If that’s the case, do the following:
1. Login to the back-end of your site
2. Go to Preferences > SEO & URLS
3. Go to the Set Shop URL Section of the screen.
4. Configure the fields in this section like this:
- Shop Domain: http://localhost:<Ports>
- Replace <Ports> by the port Apache is listening to on your localhost. If you’re using Port 80 just write http://localhost
- Base URL: the path to your Prestashop installation, relative to your root folder. If, for example, the store is located in a “MyPrestaShop” folder under your root, enter /MyPrestaShop here.
Once you have configured both the fields, click “Save. This should help you get rid of that nasty “Redirect” error!