2

I'm using laravel 5.2 and I wrote a route like this:

Route::group(['middleware' => 'web'], function () {
    Route::get('/country/{locationName}', ['as' => 'country', 'uses' => 'HomeController@getCountry']);
}); 

Then when I open my page.com/country/argentina I get the locationName from the url without problem. But if I press f5 several times It happens that my variable $locationName sometimes gets a "favicon.ico" value instead of "argentina".

Well, I don't think it's a laravel problem. It is really a simple code. Could it be a problem in the .htaccess or the apache config?

Btw, this is my .htaccess

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

    RewriteEngine On

    # SSL From cloudflare
    RewriteCond %{HTTP:X-Forwarded-Proto} =http
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>
au6usto
  • 21
  • 2
  • Do you have a favicon.ico - Browsers will almost always request this and if it is not there with this .htaccess it will be passed on to your index.php – Matt in Washington Feb 17 '16 at 06:30
  • That might be the right question! My favicon didn't work and it seems that was the problem. Thank you. – au6usto Feb 17 '16 at 16:06

0 Answers0