Remove public or index.php from URL

I use much time for solving the problem about remove index.php from url on laravel 4. The step is easy. You have to create .htaccess file on root directory, then copy Rewrite Rule as below.

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

Note : Make sure mod_rewrite works!

Tags: 

Comments

Hi.,

Its not working at Laravel 4.1. Please give me the clear code.

Email / Website: 
http://www.skylarktravels.net

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.