samedi 22 juillet 2017

Configure Htaccess in Laravel to serve website

I have this folder structure for laravel app I uploaded it online to cpanel.

enter image description here

But if I access this laravel app in browser, I need to access it like this http://ift.tt/2tqEE2a

where as I was expecting it to be as http://venkasure.com

I am not sure whether it's because of .htaccess settings .

My .htaccess file in public folder

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

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

I don't have much experience in configuring htaccess files, need help or do I need to add htaccess file in root.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire