-
-
Notifications
You must be signed in to change notification settings - Fork 1
[Bug] Rewrite rules are not specific enough, instead capturing adjacent naming #90
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
Labels
💻 aspect: code
Concerns the software code in the repository
🛠 goal: fix
Bug fix
🟧 priority: high
Stalls work on the project or its dependents
🚦 status: awaiting triage
Has not been triaged & therefore, not ready for work
Comments
Reproducible testsPrepIn local dev WordPress Admin:
FAQ redirect
FAQ link
WordPress FAQ-other
WordPress choose-other
WordPress publicdomain-other
|
7 tasks
1 task
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
💻 aspect: code
Concerns the software code in the repository
🛠 goal: fix
Bug fix
🟧 priority: high
Stalls work on the project or its dependents
🚦 status: awaiting triage
Has not been triaged & therefore, not ready for work
Description
/config/web-sites-available/000-default.conf
:lines 156-162
(assuming)These rewrite rules are too generic. If someone creates a page within WordPress labelled
faq-cert-program
orfaq_groups
orchoose-our-campaign
orchooseusnow
it throws a white page with the following error:Not only is this incorrect behavior, it also doesn't allow WP to handle the
404
condition, sending a user to a stripped down page, absent the theme.Reproduction
https://creativecommons.org/choose-our-campaign
Expectation
These conditions should be more exacting matches. The condition should occur when
/faq
is requested, but NOT when/faq-cert-course
is. The same limited behavior should occur for all these conditions.Example expected behaviors to model from:
/faq
the rewrite/redirect SHOULD occur./faq/thing
the rewrite/redirect SHOULD occur./faq-item-here
the rewrite/redirect should NOT occur./choose-use-this-holiday-season
the rewrite/redirect should NOT occur./publicdomainday
the rewrite/redirect should NOT occur.These are not all encompassing, but hopefully provide a good framework to start from.
Screenshots
Additional context
I believe the correct direction would be this pattern of change, for all of the above items:
RewriteCond %{REQUEST_URI} !^/faq
➡RewriteCond %{REQUEST_URI} !^/faq$
However, if the aim is to also redirect any sub-routes of
/faq/
further changes may be required.❗❗ Note: This is a blocking behavior within this repository as well as
index__stage
andindex__prod
for the new FAQs behavior withinvocabulary-theme
, as well as a possible collision for the new Cert site migration, which has its own FAQ page.Resolution
The text was updated successfully, but these errors were encountered: