mardi 3 juillet 2018

Htaccess Laravel - Removing Public Folder URL

I already upload my project to my host

The link is examplesite.com/Hiflyer/public/index

I want all my route their look like this.

examplesite.com/Hiflyer/index

examplesite.com/Hiflyer/news

This is my HTACCESS:

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


    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

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

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


</IfModule>

The question is how to configure it?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire