You are looking for
redirect($uri = '', $method = 'auto', $code = NULL)
In your case you would do the following in the controller result
at the function admin
. In that function you should have a code checking if the parameter login
is given as the first parameter. Add the following in that piece of code:
redirect('admin.mmm.com');
Explanation from codeigniter documentation (https://codeigniter.com/userguide3/helpers/url_helper.html#redirect)
redirect($uri = '', $method = 'auto', $code = NULL)
Does a “header redirect” to the URI specified. If you specify the full
site URL that link will be built, but for local links simply providing
the URI segments to the controller you want to direct to will create
the link. The function will build the URL based on your config file
values.
The optional second parameter allows you to force a particular
redirection method. The available methods are auto, location and
refresh, with location being faster but less reliable on IIS servers.
The default is auto, which will attempt to intelligently choose the
method based on the server environment.
The optional third parameter allows you to send a specific HTTP
Response Code - this could be used for example to create 301 redirects
for search engine purposes. The default Response Code is 302. The
third parameter is only available with location redirects, and not
refresh