bluehost-wordpress-plugin
bluehost-wordpress-plugin copied to clipboard
Deployment from staging to production overwrites `.htaccess`
Summarize the issue (briefly)
When I deploy from my staging site to my production site, my production .htaccess
file gets overwritten. That file contains the rule that redirects HTTP requests to HTTPS; but when the file gets overwritten, the rule disappears, and I have to re-add it manually.
It also doesn't seem to matter if I add the rule to the staging .htaccess
file; it doesn't get copied over to production (or at least, the HTTP-to-HTTPS redirection rule doesn't get copied over).
Steps to reproduce
- Make changes to both staging and production
.htaccess
files to include (for example) an HTTP-to-HTTPS redirection rule. - In the Wordpress settings, navigate to the Bluehost plugin's Staging page.
- Click the "Deploy all changes" button.
- Notice that the HTTP-to-HTTPS redirection rule is now gone from the production
.htaccess
file and that visiting the production site using HTTP fails to redirect to HTTPS.
Expected behavior
I expect changes that I make to both staging and production .htaccess
files to persist after deployment. I understand that there are probably good reasons for overwriting certain values in the production .htaccess
file, but it'd be nice if there was at least one section of the file that was specifically for rules that would not be overwritten, like:
# ==========
# Put some custom rules here:
# ==========
# %%%%%%%%%%
# Do NOT change these values; they're overwritten automatically during deployment!
# %%%%%%%%%%
# ==========
# Put some more custom rules here:
# ==========
Bluehost Plugin Version:
- Version: 2.12.13
Thanks!