-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Related to the PR I just created for add_trailing_slash, I wanted to propose a change in force_root_path.
I thought it would work more like add_root_path in NormalizeUrl, that is, only converting an empty path into "/", but respecting non-empty paths like /some/dir.
Instead I see that force_root_path completely replaces any path into the root path. In this case I think we should consider also removing the query and fragment:
example.com/some/dir#faqs?page=2->example.com/
But I'm not sure about that, maybe we should have other options like wipe_query and wipe_fragment.
Or, include add_root_path as in the above explanation, this would convert URLs like:
example.com->example.com/example.com/some/dir->example.com/some/dir/example.com/some/dir#top?p=2->example.com/some/dir/#top?p=2
What do you think?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels