Error Sorry, the page you are Looking for could not be found. in Arabic

Asked

Viewed 5,714 times

1

I got a problem with this one website it appears this error on the screen when I try to access it inserir a descrição da imagem aqui what can this mistake be as I do to fix it.

My parents:

<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});


Route::post('/', 'FormController@postContato');

O . HTACCESS

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

    RewriteEngine On

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]

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

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
# Habilitar o PHP 5.5
AddHandler application/x-httpd-php55 .php
<IfModule mod_suphp.c>
suPHP_ConfigPath /opt/php55/lib
</IfModule>
  • 1

    You have a route problem. You are accessing a non-existent route. Enter the Routes.php and your main Controller to open the main page.

  • 1

    As his .htaccess is configured? Are you using shared or dedicated server? Generally, in shared you can not configure the appointment (by Apache).

  • 1

    Take a look at this question: http://answall.com/questions/43685/problema-com-subpastas-e-reescrita-de-url-comlaravel

  • 1

    Here also: http://answall.com/questions/88265/publicar-laravel-5-em-uma-subpasta

  • 1

    I will edit my post with these guidelines

  • Put the Formcontroller too

  • @Wallacemaxters edited my post from a look

  • @Gumball I edited my post from a look

  • It is. Silly of me to say that.

  • @Kirito curiosity: Have you published Laravel in the "public_html" folder? or something like a "main folder"? If so, this may be the problem. Like I said, it’s very common on shared servers.

Show 5 more comments

1 answer

2


The briefcase /public and the folder will not be considered a route, if you do this will appear:

<?php
Route::get('/', function () {
    return view('welcome');
});

Route::get('/public', function () {
    return 'Olá, mundo!';
});

Don’t use the public, it’s just to understand the routes

The problem is that you did not understand very well how Laravel works, you have to configure the folder ./public as the default Apache folder.

In this answer I explain how to use in production and development environment:

  • Friend he generates the normal domain urlcom but he adds http://jetwash.com.br/#form-contact

  • @Kirito understood, after the POST (Form submission). Please put the controller content FormController@postContato in the question

Browser other questions tagged

You are not signed in. Login or sign up in order to post.