zuzuleinen
zuzuleinen

Reputation: 2634

Routes not working with index.php in url Laravel 4

I have an application using Laravel 4. And I modfied the .htaccess file so I can redirect mydomain.com to www.mydomain.com. Here is the .htaccess file:

<IfModule mod_rewrite.c>
    Options -MultiViews
    RewriteEngine On

    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]

</IfModule>

When I go to a route like mydomain.com/account/create all works fine, but when I go to mydomain.com/index.php/account/create I get a file not found error. Can someone point me in the right direction? Thanks!

Upvotes: 0

Views: 913

Answers (1)

Laurence
Laurence

Reputation: 60068

It is not working - because laravel is not designed to have index.php in your route.

I'm guessing you are coming from the old Codeigniter days when some sites still have index.php in their route - but this is a different routing system.

Just use the normal routes.

Upvotes: 2

Related Questions