$routes->addRedirect with regex? |
(02-11-2021, 11:36 PM)iRedds Wrote: The simplest, and probably better in this case, is to make a redirect at the web server level OK I think I will make a redirect method in my BaseController that works like the old CI3 redirect function.. Does anyone know why CI3 used the refresh method for Microsoft-IIS? Does anyone know why CI3 would check for HTTP/1.1 and then use 307 for GET requests and 303 for everything else? It looks like 303 and 307 were added for HTTP/1.1 and did not exist before. EDIT: I'm not sure, but it looks like a 307 redirect would encourage the client to re-POST any data that was posted. This does not sound like the behavior I'd be after. E.g., if someone's session had expired and they attempt to POST a form, I'd be redirecting them to a login page first, and it would not be ideal to have an immediate POST applied there. Also, it looks like we have HTTP/2 as of 2015, so we'll probably need a > comparison, and possibly additional logic. Any tips/hints/thoughts very much appreciated. |
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
|