Bug 34863

Summary: Allow definition of custom url for pages
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: ToolsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: barbara.johnson, blawlor, chris.rowlands6, dcook, george, jzairo, kelly, lauren_denny, lisette, lucas
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36866
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35334
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Andrew Fuerste-Henry 2023-09-21 13:05:52 UTC
When creating pages in Tools, it's be helpful to give a page a custom url based on a unique string. So one could give the page a slug like "longoverdues" and then have a url like "/cgi-bin/koha/tools/page.pl/longoverdues" or something more human-readable and human-rememberable.
Comment 1 Lisette Scheer 2023-09-25 17:22:56 UTC
+1
Comment 2 David Cook 2024-05-16 01:53:10 UTC
+1
Comment 3 George Williams (NEKLS) 2024-08-15 20:47:56 UTC
+1
Comment 4 Juliet Heltibridle 2024-08-15 20:48:28 UTC
+1
Comment 5 David Cook 2025-07-09 23:31:52 UTC
Still think this is a cool idea and in theory shouldn't be hard to do.

For anyone interested in writing this, check out "svc/bib" and it's use of $query->path_info(). Basically, the controller gets matched using part of the URL and then the rest of the URL is passed to the code in the path info. 

Either in page.pl or in a prettier path like "/cgi-bin/koha/page/longoverdues". I think we'd want something like "/page/" so we don't have potential conflicts with other parts of Koha.

Routing by path is easy when using Plack/PSGI or Mojolicious, but harder when just using CGI. Of course, hopefully at some point we'll remove the CGI option (bug 39305 for a step in that direction...).

Of course, another option is to just make /cgi-bin/koha/tools/page an Alias of /cgi-bin/koha/tools/page.pl in Apache but that's suboptimal in the long-run as it just entrenches us further into Apache.
Comment 6 David Cook 2025-07-09 23:41:02 UTC
(In reply to David Cook from comment #5)
> Still think this is a cool idea and in theory shouldn't be hard to do.

That said, I'm unlikely to work on this without sponsorship :|. I've got too many other in-demand tasks.

But if someone else works on it, I'm happy to review it as it would be a great addition to Koha.