Create a .htaccess file in PrestaShop

by Curt Donohue on January 1, 2011

In this video, I will show you how to complete the following tasks for your version 1.3.x PrestaShop store:

  • Set up friendly URL's
  • Create a blank .htaccess file
  • Upload that blank .htaccess file to your web host
  • Generate the PrestaShop .htaccess file


Learn PrestaShop 1.4 Fast!

Curt Donohue

Curt Donohue is a PrestaShop enthusiast and the creator of as well as PrestaShop 1.4 Tutorials.

Facebook Twitter LinkedIn 

Razvan August 22, 2013 at 2:24 am

Hello, Curt!

I have activated the URL rewrite mode for (uses PS and I am getting the “page not found” error for the homepage and CMS pages.

How do I do this correctly in PS Where do I find the Generators section so that I can (re)generate the .htaccess file (if this is what I must do).

Thank you!

Matias June 18, 2013 at 5:29 pm

Nice tutorial, pretty good for starters. I’ve got a problem though. I’ve got a PrestaShop website (made by other people) and they want to add a new module. I’ve installed this module and keep on getting 404 errors. I started investigating the cause and got the answers I got were “regenerate .htaccess”. This tutorial is for creating the .htaccess. My new question is: can I just regenerate it without any troubles or should I check something first? If you can answer me this, I’ll be very happy. Sorry for bad English, not my native language. Thanks.

Curt Donohue June 18, 2013 at 6:18 pm

Hi Matias,

I’m not sure if you can regenerate your .htaccess file without causing problems since I don’t know if you or anyone else has customized that file since it was installed. Regenerating the file will essentially reset it to it’s original form, which may or may not work for you.

If you decide to regenerate the file, be sure you make a copy of the original .htaccess file and rename it something like “.htaccess-old.”

After you make that copy, if you find that regenerating the .htaccess files gives you trouble, just delete the newly regenerated file and change the renamed “.htaccess-old” back to “.htaccess.” Be sure you don’t include any of the quotes I’ve used. They are just there to help clarify my meaning.

Let me know how that goes.

Poema May 4, 2013 at 5:55 pm

It helped a lot Curt, God bless you.

Curt Donohue May 5, 2013 at 7:41 am

Your welcome Poema.

icute July 9, 2012 at 10:29 am

Hi Curt,
Thanks for the feedback.
I have found the solution. I restore back the .htaccess file from the old backup and it works just fine.

I guess messing up with .htaccess file need extra precaution-the backup~

icute July 2, 2012 at 10:12 am

Nice tutorial, but i have some issue in getting the default settings of .htaccess file, somehow i cannot login to backoffice and generate the new .htaccess. Where i can get the default settings of .htaccess? My prestashop is install in subdirectory example:

Curt Donohue July 2, 2012 at 11:03 pm

Hi icute,

You’ll need to provide more information.

  • What version of PrestaShop are you using?
  • Did you just install it?
  • Have you had trouble logging in before?
  • Do you have an FTP program like Filezilla that you can use to get to your files on the webhost?
  • What web host are you using?
  • Have you called or e-mailed your web host regarding your issue with logging in to the back office?

Let me know.

Next post: