Welcome Guest, Not a member yet? Register   Sign In
Routes without subdomain
#1

How to set routes that work only with main domain and do not work with subdomains?

Trying this way:


PHP Code:
$routes->group('', ['subdomain' => ''], static function ($routes) {
    $routes->get('search''Home::page');
}

$routes->group('', ['subdomain' => 'es'], static function ($routes) {
    $routes->get('búsqueda''Home::page');



Results are:

site/search (works, ok)
site/búsqueda (404, ok)
es.site/search (works, not ok !!!, must be 404)
es.site/búsqueda (works, ok)
Reply
#2

Try to use https://codeigniter4.github.io/CodeIgnit...o-hostname
Reply




Theme © iAndrew 2016 - Forum software by © MyBB