Tuesday, February 28, 2017

How to issue and customize .htaccess for Laravel?

I have just launched a Laravel 5.3 project on a live server and all is going well except for one.

But my issue is, I see my website with 3 different URL:

  1. website.com

  2. http://ift.tt/2ltQHrN !!!!

  3. website.com/ any word !!!!! /index.php !!!!

My .htaccess is: (This file is in the root folder)

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
    RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [R=301,QSA,NC,L]

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    RewriteRule ^(.*)$ public/index.php$1 [L]
</IfModule>

I need jsut see my website with website.com URL.

Thank you.




via mySun

Advertisement