The laravel application seems to have routes issue with the sub-directory on server. With the running application on local machine does not work on temporary domain in sub-directory on live server. Playing around .htaccess
seems to have different results.
This question is almost identical to what I would be looking for but he hasn't got any solution while I have got some work around.
The .htaccess
within the laravel public
have been modified to something like:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
RewriteBase /~timely/email-client //<--base has been modified
# 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 application will redirect you to host gator 404 page.
Also I've added .htaccess
to the main directory which will forward every request to public
directory.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
Upon removing the home/main .htaccess
just works for /
route: e.g
http://gator4057.temp.domains/~timely/email-client/public
will work but all other routes are redirected to the same host gator 404 page.
Your comments and answers will be appreciated.
Thanks