Problems with .htaccess when hiding public folder 5.4

1

I need to do deploy for production of an application that I migrated to laravel 5.4, in test environment I am using the virtual host on windows where I type in url 'mysite1' and until then beauty.

But when I was setting up with .htaccess when accessing the application via url 'mysite1' the ajax files for example lose the reference and point to the DocumentRoot which in this case is htdocs and not htdocs \ mysite1, and so they force write in the code of an image for example: 'myite1 / img / banner.png' and not just 'img / banner.png'

As I'm working with two applications, I used the response from the Laravel 5 - Remove public from URL

I configured Apache VirtualHosts like this:    ServerAdmin [email protected]    DocumentRoot "/ htdocs"

Alias / mysite1 "/ htdocs / mysite1 / public"            Options Indexes FollowSymLinks Includes ExecCGI        AllowOverride All        Require all granted    

Alias / mysite2 "/ htdocs / mysite2 / public"            Options Indexes FollowSymLinks Includes ExecCGI        AllowOverride All        Require all granted    

In the .htaccess file of the public folder inside my myite1 it looks like this:              Options -MultiViews     

Options +FollowSymLinks
RewriteEngine On
RewriteBase /meusite1

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

Could someone give me a light where I'm going wrong?

    
asked by anonymous 23.11.2017 / 01:32

0 answers