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

Issue with appending target and blogs in subdirectories #4

Open
CNG opened this issue Jun 17, 2016 · 2 comments
Open

Issue with appending target and blogs in subdirectories #4

CNG opened this issue Jun 17, 2016 · 2 comments

Comments

@CNG
Copy link

CNG commented Jun 17, 2016

I encountered this with 2.0.0, but at a glance it seems the issue should exist in 2.1.

If I use CleanSweep separately at the root / website level and a blog located at /blog/ and want both to use the same 404 page, I don't think I have a way to distinguish whether the target page was within /blog or not. Attempts to visit a nonexistent page /blog/missingpage.html will result in the 404 page being loaded with ?target=missingpage.html.

I initially tried to resolve this by setting the 404 page for the blog to /404.html?basedir=blog, but that will then result in an erroneous URL ending in /404.html?basedir=blog?target=missingpage.html. We'll either need to test for a trailing question mark at

$redirect .= '?target=' . $target
or implement other logic to prepend the blog path to the target, or preferably both.

@danwolfgang
Copy link
Member

Trying to deal with website/blog hierarchy is always something that's been in the back of my mind. (pre-2.0.0 even!) I added 12c8163 recently to try to better handle it. I have also previously thought that setting an environment variable for each blog ID (based upon folder structure) could be a way to communicate the blog ID to CleanSweep that is then used to look up results for each blog. But simply, I don't have enough clients using CleanSweep to justify the time!

@CNG
Copy link
Author

CNG commented Jun 29, 2016

No problem, Dan! Just registering the issue in case I or someone else find a need to address it in the future. Thanks!

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

No branches or pull requests

2 participants