lundi 28 décembre 2015

url not found error in laravel

I am using Laravel 5 with a new version of apache on ubuntu and when I try to access the page: localhost it works and if I try localhost/index.php/my_page it works but if I try localhost/my_page, it doesnt. So from searching other questions I guess my problem lies in the .htaccess file.

As per suggestions I saw online I added the rewriteBase and Options +FollowSymLinks to my .htaccess in laravel/public:

    <IfModule mod_rewrite.c>
      <IfModule mod_negotiation.c>
        Options -MultiViews
      </IfModule>

      Options +FollowSymLinks
      RewriteEngine On
      RewriteBase /repos/kenrose/public

      # Redirect Trailing Slashes...
      RewriteRule ^(.*)/$ /$1 [L,R=301]

      # Handle Front Controller...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [L]
   </IfModule>

and this is what my apache2.conf file looks

    <Directory /repos/kenrose>
       Options Indexes FollowSymLinks
       AllowOverride All
       Require all granted
    </Directory>

I've taken all the suggestions i've found about this issue. What is the problem?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire