If I understand correctly what you want to do, then doing it in code is perhaps not the best approach. Instead you can use the .htaccess file to control the redirect and display the appropriate URL in the browser.
In reply to Re: Mojolicious url rewriting
by Bod
in thread Mojolicious url rewriting
by rajaman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |