$routes->addRedirect with regex? |
The addRedirect() method does not support replacement.
You can use this hack PHP Code: $routes->any('subdir/([a-z\-]+)/([a-z\-]+)-(\d{2}-\d{4}\.\d{2})\.html', function(){ Or create your own class that extends the Router class and implement a replacement in it. Or post a new issue on github or PR with fixes or comment in the documentation about the inability to use regex. |
Messages In This Thread |
$routes->addRedirect with regex? - by sneakyimp - 02-10-2021, 05:31 PM
RE: $routes->addRedirect with regex? - by iRedds - 02-11-2021, 03:37 AM
RE: $routes->addRedirect with regex? - by sneakyimp - 02-11-2021, 11:23 AM
RE: $routes->addRedirect with regex? - by iRedds - 02-11-2021, 11:36 PM
RE: $routes->addRedirect with regex? - by sneakyimp - 02-15-2021, 11:51 AM
RE: $routes->addRedirect with regex? - by sneakyimp - 02-15-2021, 01:46 PM
|