mercredi 2 septembre 2015

Remove index.php from url Laravel 5

URLs are working fine in my application. I mean they are pretty URLs. Like http://www.example.com/ But it also works when you access the page with index.php like http://ift.tt/V4rFOk, which I don't want it because it is showing two pages in sitemap for one page. One page without index.php and another with index.php. Demonstration of the sitemap is here http://ift.tt/1O9lt0V

Here is the .htaccess

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



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1KIuxuX
via IFTTT

Aucun commentaire:

Enregistrer un commentaire