Laravel - The requested URL was not found on this server

1

What I did

I made a form that registers the data in the database. Locally it worked perfectly.

Problem

It simply says that it is not matching the URL. It's strange because the error below says that public index.php was not found, and if you're wondering, the form's action is right, it's calling the gerarPdf method.

The requested URL /var/www/laravel/barcodeAssinatura/public/index.php was not found on this server.

url accessed

link

public / .htacces

<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>

routes.php

Route::get('/', 'HomeController@index');
Route::post('gerarPdf', 'HomeController@gerarPdf');

OBS : An alias has been created so that when accessing the site it will call public / index.php .

    
asked by anonymous 06.05.2015 / 15:11

1 answer

1

I solved this problem by removing this line from .httaccess: RewriteRule ^(.*)/$ /$1 [L,R=301]

    
16.08.2018 / 17:48