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

Adding optional support for trailing slash clean in PATH #379

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

rippak
Copy link
Contributor

@rippak rippak commented Jun 1, 2024

Moved one old project to F3 where trailing slashes in routes are obligatory

base.php Outdated
@@ -2530,6 +2531,7 @@ function($level,$text,$file,$line) {
'PACKAGE'=>self::PACKAGE,
'PARAMS'=>[],
'PATH'=>$path,
'PATH_SLASH_CLEAN'=>TRUE,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When this gets accepted, make all indentations consistent and don't forget to update the documentation. :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'll check it. Phpstorm shows normal indents.
Where should I update the docs?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs are here, but I would wait until this change got accepted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, just asking

@ikkez
Copy link
Member

ikkez commented Sep 22, 2024

Would you mind if we rename the option var to something like... REROUTE_TRAILING_SLASH maybe? 🤔
I'm wondering if there's more to do here. Like generating links to aliases? Switching to trailing slashes and also reroute non-trailing slash urls to those with slash, when the new option is on. Having both options enabled might lead to duplicate content warning .. just keep that in mind.

@rippak
Copy link
Contributor Author

rippak commented Sep 22, 2024

Naming is not a problem at all.

@ikkez ikkez merged commit 0f8b89f into f3-factory:master Sep 25, 2024
@ikkez
Copy link
Member

ikkez commented Sep 25, 2024

Renamed to REROUTE_TRAILING_SLASH and committed.

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

Successfully merging this pull request may close these issues.

3 participants