CodeIgniter Forums

Full Version: Q: mod_rewrite to myController/Method directly ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

Hi guys,

I'm trying to use mod_rewrite to redirect one of the hostname to a controller/method directly,
with this .htaccess, but failed, it always give me the home page.

RewriteCond %{HTTP_HOST}
RewriteRule ^$ index.php/blog/index [L]

If I browse to it works, but if I browse to, apache always render me the page content of,

With RewriteLogLevel 1, I have no idea what's the problem:
/initial] (1) [perdir /var/www/] internal redirect with /index.php/blog/index [INTERNAL REDIRECT]
/initial/redir#1] (1) [perdir /var/www/] pass through /var/www/index.php
/subreq] (1) [perdir /var/www/] internal redirect with /index.php/blog/index [INTERNAL REDIRECT]

Am I missed some thing ?

thanks and regards