mercredi 17 octobre 2018

Two different domain with two different Laravel Project in same Hosting

I am trying to run two different LARAVEL projects on same server with two different domain names,

When somehow I run one then I need to delete htaccess file of antoher.

One domain having access of full server and another having one folder.

How to write htaccess file so I could use both domain in same time.

following is my htaccess code

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



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire