Patch: drop R=301 flag on RewriteRule#201
Patch: drop R=301 flag on RewriteRule#201colisee wants to merge 1 commit intoLibreBooking:masterfrom
Conversation
|
To test:
|
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
As a note I don't think the upstream patch is correct. As it removes the redirect. I'm not 100% sure it isn't correct but I am leaning that way. UPDATE 2026-04-26: I'm now less confident about it being incorrect. But I'm also not sure it is the correct way to fix it. Leaning somewhat towards merging it, but worried it might break something we aren't considering. |
This is odd, for the patch code was added around line 106... |
The patch removes the redirect flag
|
| # Patch the /web rewrite | ||
| sed \ | ||
| -i /var/www/html/.htaccess \ | ||
| -e '/^RewriteRule/s:\[R=301,L\]:\[L\]:' |
There was a problem hiding this comment.
This would be enough sed '/^RewriteRule/s:R=301,::' to remove redirect. In the substitution the \ -marks are not needed anyhow in \[
There was a problem hiding this comment.
If you want to keep it longer for readability, go ahead, but I'd still remove the backslashes from substitution part.
There was a problem hiding this comment.
This sort of breaks the fix that was done on line 132 below. For being idempotent.
| # Patch the /web rewrite | ||
| sed \ | ||
| -i /var/www/html/.htaccess \ | ||
| -e '/^RewriteRule/s:\[R=301,L\]:\[L\]:' |
There was a problem hiding this comment.
This sort of breaks the fix that was done on line 132 below. For being idempotent.
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Related to librebooking/librebooking PR 1358
Patch added to script
entrypoint.shto backport the fix to existing releases (v4.3.0, v4.2.0,...)Close issue #200