CodeIgniter Forums

Full Version: routes.php and 3rd level domain
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

Hi everyone,

i was wondering if there's a way to do this:

by typing ->
apache would call ->
thus keeping in the url

i managed to to so by adding this to my .htaccess file

RewriteCond %{HTTP_HOST}  !^(www.*)
RewriteCond %{HTTP_HOST}  ^(.*)
RewriteRule ^(.*)$ /index.php/controller1/method1/%1 [QSA,L]

But i was looking for a way to use routes.php instead.

Any suggestion?

Thanks in advance

El Forum

Don't quote me here, but I don't think it can be done. To my knowledge, routes only work with URI segments, not with the HTTP Host, but I'm sure you could perhaps extend the router to do what you want.

El Forum

Wow, that was fast!

Thanks anyway, i just wanted to leave my .htaccess as clean as i could.