php - Laravel 5 mod_rewrite not working -


/etc/apache2/apache2.conf

<directory />         options followsymlinks         allowoverride         require granted </directory>  <directory /usr/share>         allowoverride         require granted </directory>  <directory /var/www/>         options indexes followsymlinks         allowoverride         require granted </directory> 

and in laravel public folder:

<ifmodule mod_rewrite.c>     <ifmodule mod_negotiation.c>         options -multiviews     </ifmodule>      rewriteengine on      # redirect trailing slashes...     rewriterule ^(.*)/$ /$1 [l,r=301]      # handle front controller...     rewritecond %{request_filename} !-d     rewritecond %{request_filename} !-f     rewriterule ^ index.php [l] </ifmodule> 

url: http://sub.domain.se/user/login not work.

but http://sub.domain.se/index.php/user/login

works.

when writing: apachectl -m

rewrite_module (shared) included

in sites-enabled:

<virtualhost *:80>         servername sub.domain.se         documentroot /var/www/project/public </virtualhost> 

what missing?

my working .htaccess file following:

<ifmodule mod_rewrite.c>     <ifmodule mod_negotiation.c>         #options -multiviews     </ifmodule>      options +followsymlinks     rewriteengine on      # redirect trailing slashes...     # rewriterule ^(.*)/$ /$1 [l,r=301]      # handle front controller...     rewritecond %{request_filename} !-d     rewritecond %{request_filename} !-f     rewriterule ^ index.php [l] </ifmodule> 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -