I am looking to make a custom route using the CodeIgniter framework. I am trying to make the URL like so:
http://localhost/accounts/Auth.dll?signin
So far I have tried adding the following to my routes.php config file:
$route['accounts/Auth.dll?signin'] = "accounts/signin";
but as you would guess, it doesn't work. I have also tried escaping the characters like this:
$route['accounts/Auth\.dll\?signin'] = "accounts/signin";
and that doesn't work either. I've also tried including the leading and trailing slashes .. that didn't work either. Anyone know by chance what could solve my issue?
I highly recommend to use a SEF routing.
But if for any reason you're not eager to, you could check the query string inside the
Accounts
Controller, and then invoke the proper method, as follows:Router:
Controller:
This allows you to invoke the methods by query string automatically.
I am not sure, that its okay to use GET-params in routes.php config. Try such way:
routes.php
accounts.php
But, as for me, it's bad way.
I recommend you just use another routing:
And etc.