Jump to content

Find a way to edit .htaccess or update SEO/URLs with bash

Recommended Posts

Hi all ! 

I am writing a bash script to automate the migration (Prestashop 1.7.x.x) from my production environment to my development environment.

Everything is OK but the last step is the regeneration of URLs in the htaccess. 
Have you found a solution to rewrite the htaccess without going through the back office?

For example by executing a PHP script to call the htaccess rewrite function?

I thought about using "sed" on the command line but it's a little hard to use and it's not very generic.

When it's over, I can share it !

Thanks in advance for your response,

I remain open to any proposal,


Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More