john-lang-86 / lj-maintenance-mode

Simple maintenance mode wordpress plugin.
https://plugins.itsluk.as/maintenance-mode/
0 stars 1 forks source link

Allow Home ('/') in Options List #13

Closed john-lang-86 closed 2 years ago

john-lang-86 commented 2 years ago

Situation: The user friendly capability to ignore trailing slashes has resulted in an inability to allow the homepage (/) to show when in maintenance mode. Opps.

Solution 1: Add a bit of code where the trailing slash removal is in the 'Allowed URIs (Strict)' option; and don't remove it if it also happens to be the first and only character in the $needle. To-Do 1: Solution 1 and add a 'Tip' below the option to call out that / in the list will allow the homepage.

Tip: This capability/fix must be enabled in the 'Allowed URIs (Strict)' option, only.

Tip: This should never be enabled in the 'Allowed URIs (Contains)' option list, because that would allow the whole site. The current logic that effectively 'fails to match' a / in this option, should remain in-place and as-is.