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

Add ability to define environment .htaccess rules #107

Closed
wants to merge 3 commits into from
Closed

Add ability to define environment .htaccess rules #107

wants to merge 3 commits into from

Conversation

filiplikavcan
Copy link

@filiplikavcan filiplikavcan commented Feb 12, 2021

This PR enables site developer to define environment .htaccess rules in .htaccess.env file which would be copied to .htaccess whenever user/admin updates security settings and aiowps updates .htaccess content.

It could be used in two scenarios:

1.) .htaccess.env is versioned and developer wants it the same for every environment (for example to setup redirects from old url to new without need to copy oiowps configuration (custom rules) to every environment)
2.) .htaccess.env is not versioned (for example to setup different rules for different environments as part of automatic deployment process)

If this PR makes sense for you the idea can be extended further. For example we could add support for combination of two aforementioned scenarios: One file (.htaccess.all) for first scenario and another file (.htaccess.env) for second scenario.

@filiplikavcan
Copy link
Author

An alternative would be to add a hook (for example 'aiowps_htaccess_rules') which would allow developers to inject their own .htaccess rules.

@Arsenal21
Copy link
Owner

I would be more comfortable with a hook like you mentioned.

@filiplikavcan
Copy link
Author

I created new PR for this: #108

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

Successfully merging this pull request may close these issues.

2 participants