The default laravel htaccess is fully compatible with friendly urls. restore it
After I restored laravel .htaccess I still can't open Route example.com/wniosek.html still have the same exception!
Get rid of the .html at the end of the url.
But I need urls with .html at the end this is why I asked for help. I am migrating one site to laravel and this .html urls are required.
With the default .htaccess, whenever a real html file is there, RewriteCond %{REQUEST_FILENAME} !-f
won't match and no rewrite will occur (the html file will be served).
Are those "wniosek.html" and "index.html" real files inside the correct directory?
You shouldn't use Route::resource like that. You should use Route::get() (or post/any)
Route::get('wniosek', 'HomeController@showTest');
And if you need the .html extension:
Route::get('index.html', 'HomeController@showIndex');
Route::get('wniosek.html', 'HomeController@showTest');
Are those "wniosek.html" and "index.html" real files inside the correct directory?
No those files don't exist. I have only index.php in public directory
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community