Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment from staging to production overwrites .htaccess #265

Open
jrc03c opened this issue Nov 24, 2022 · 0 comments
Open

Deployment from staging to production overwrites .htaccess #265

jrc03c opened this issue Nov 24, 2022 · 0 comments

Comments

@jrc03c
Copy link

jrc03c commented Nov 24, 2022

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

  1. Make changes to both staging and production .htaccess files to include (for example) an HTTP-to-HTTPS redirection rule.
  2. In the Wordpress settings, navigate to the Bluehost plugin's Staging page.
  3. Click the "Deploy all changes" button.
  4. 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant