Changes between Initial Version and Version 1 of Ticket #31330, comment 12


Ignore:
Timestamp:
Mar 21, 2020, 5:36:40 AM (5 years ago)
Author:
Simon Barnett

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31330, comment 12

    initial v1  
    11I think the addition of the slash causes a different problem.
    22
    3 Any valid page URL will match the catch all pattern, but the actual URL that is captured will not have the last slash in it. This will cause the flatpages view code to fail to find the page, add a slash to the URL and then return a permanent redirect to that URL with an extra slash on the end of it. So if the URL is '/someurl/', the user will be redirected to '/someurl//'.
     3Any valid page URL will match the catch all pattern, but the actual URL that is captured will not have the last slash in it. This will cause the flatpages view code to fail to find the page, add a slash to the URL and then return a permanent redirect to that URL with an extra slash on the end of it. So if the URL is '/someurl/', the user will be redirected to '/someurl`//`'.
    44
    55I think the last slash needs to be inside the captured part of the URL, which can be done with re_path, like this:-
Back to Top