When I run from the controller for http://www.mysite.com/login
return Redirect::to_action('profile');
it brings the user to http://www.mysite.com/index.php/profile
I’ve tried it with Redirect::to(‘profile’); but that doesn’t work either.
Redirect::home(); brings me to http://www.mysite.com/index.php which lead me to believe that my mod_rewrite was somehow not working but I have
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
in the .htaccess under public.
For Laravel to generate links minus the index.php prefix, you need to configure it correctly in addition to having the .htaccess file.
It’s easily overlooked, so make sure you’ve set
'index' => '',in yourapplication/config/application.php. It’s on line 42 in the default config.