mercredi 21 février 2018

How do I by-pass the Public Folder in the url (Lavarel 5.4)

I have read and tried different solutions to this problem including the ones from this post Laravel 5 - Remove public from URL but It didn't work for me. I have a folder called 'abimswake' - the root folder. Every time i have to access my project I access through this url http://localhost:8080/abimswake/public/login After trying all the solutions from that post, my url changes to http://localhost:8080/public/public when i try to access the same URL

Then I also want to know how the url will look like without the public in it. Please someone help me. my .htaccess file is here

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

    RewriteRule ^(.*)$ public/$1 [L]

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



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire