In PrestaShop, regenerating the .htaccess file is easy and safe if you do it the official way. This is often needed after changing URLs, enabling SSL, or fixing 404 errors.
✅ Method 1 (Recommended): From Back Office
This is the correct and safest method.
- Log in to PrestaShop Back Office
- Go to
Shop Parameters → Traffic & SEO - Scroll to Set shop URL
- Click Save (don’t change anything)
👉 PrestaShop will automatically regenerate the .htaccess file
✅ Method 2: Manually Delete & Regenerate
Use this if the file is corrupted.
Step 1: Delete .htaccess
- Connect via FTP / File Manager
- Go to your root PrestaShop directory
- Delete the
.htaccessfile
⚠️ Make sure hidden files are visible.
Step 2: Regenerate
- Back Office → Shop Parameters → Traffic & SEO
- Click Save
✔ .htaccess will be recreated automatically
✅ Method 3: Using Friendly URLs Toggle
Sometimes useful if URLs are broken.
- Shop Parameters → Traffic & SEO
- Turn Friendly URL → NO
- Click Save
- Turn Friendly URL → YES
- Click Save
This forces a fresh .htaccess rewrite.
🔧 File Permissions (Very Important)
Make sure:
.htaccess→ 644- Root folder → 755
If permissions are wrong, PrestaShop cannot regenerate it.
🧪 When Should You Regenerate .htaccess?
- 404 errors on product/category pages
- After moving site to HTTPS
- After changing domain or subfolder
- SEO URL issues
- After restoring backup
📝 Tip for PrestaShop 1.7 / 8 / 9
All versions regenerate .htaccess the same way via Traffic & SEO → Save.
