Skip to content
New issue

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

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

Already on GitHub? # to your account

Improve UX of auto-updating .htaccess and provide manual update instructions #646

Open
raamdev opened this issue Dec 30, 2015 · 0 comments

Comments

@raamdev
Copy link
Contributor

raamdev commented Dec 30, 2015

Many site owners run security plugins that either prevent writing to .htaccess files or store the .htaccess contents in the database itself. In those scenarios, it would be nice to give site owners the option to disable the automatic-updating of the .htaccess (which, for those site owners, results in persistent Dashboard errors about being unable to write to the .htaccess) and automatically show them what they need to add to their .htaccess file.

The rules that need to be added to the .htaccess file should automatically get updated as various ZenCache options are enabled/disabled.


Update 2016-06-17

The only time the .htaccess file is written to as of v160521 is when Static CDN Filters are enabled (so as of v160521, auto-updating the .htaccess only occurs in the Pro version, since Static CDN Filters are a Pro-only feature). That means what we actually need is just an option to disable the .htaccess rules that are added automatically for Static CDN Filters. See #787 for work related to adding this option to the new Apache Optimizations panel.

The upcoming Apache Optimizations panel will have several new options that tweak the .htaccess file in various ways (e.g., see #554, #765, #764), however all of those options will be disabled by default so we don't need a new option to disable them.

For this GitHub issue, what we need to work on is automatically detecting when an update to the .htaccess file fails repeatedly, and then automatically disable the auto-insertion of .htaccess rules (in the Apache Optimizations paneL) and display a Dashboard notice letting the site owner know about what has happened. They can then fix the issue and re-visit the Apache Optimizations panel to re-enable the appropriate options.

Additionally, each option inside the Apache Optimizations panel should have a link or button that allows a site owner to see what rules will be automatically inserted into the .htaccess file, that way if desired they can leave the options disabled but manually update their .htaccess file.

@raamdev raamdev changed the title Feature Request: Option to disable automatic writing to htaccess Improve UX of auto-updating .htaccess and provide manual update options Jun 17, 2016
@raamdev raamdev changed the title Improve UX of auto-updating .htaccess and provide manual update options Improve UX of auto-updating .htaccess and provide manual update instructions Jun 17, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant