.htaccess support for OpenLiteSpeed webservers. #24666
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
The current rewrite rules existing in the created .htaccess files are only supported for Apache webservers, and leaves files exposed on OpenLiteSpeed webservers by default. This is the easiest way to add support for OpenLiteSpeed 1.4.38+.
This pull request was born from this mattermost chat discussion
Before
Before the rewrite rules for OpenLiteSpeed are added to the .htaccess files, the CiviCRM system status produces warnings about Private Files being Readable when running on a drupal 9 site on a OpenLiteSpeed webserver.
![image](https://user-images.githubusercontent.com/54978466/193626011-6448c13b-b5e2-4a49-affa-4044777688a0.png)
After
After the rewrite rules for OpenLiteSpeed are added to the .htaccess files, the CiviCRM system status no longer produces warnings about Private Files being Readable when running on a drupal 9 site on a OpenLiteSpeed webserver.
Notes
To make sure this will work on OpenLiteSpeed,
![image](https://user-images.githubusercontent.com/54978466/193764966-b2546a0e-de44-4b84-b068-e8acd53c2ffa.png)
Enable Rewrite
andAuto Load from .htaccess
has to be set toYes
in the Rewrite Control settings of the vhost.