6
I was working with this structure and with this htaccess:
structure
config/
logs/
www/
app/
bootstrap/
public/
packages/
.htaccess
index.php
...
vendor/
.htaccess
...
htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
But I took a shared hosting where I can’t change the root, and I ended up leaving the structure this way:
config/
logs/
www/
folder/
app/
bootstrap/
public/
packages/
.htaccess
index.php
...
vendor/
...
.htaccess
In htaccess I left the same and also made several changes, but none worked. How would I do in this case ? The page is whole white, without showing any error or anything.
UPDATE: my .htaccess inside the briefcase public, this way:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
my www is root, and the way you said it works normally, but in the case of this client I will need to insert the folder 'Folder' after root and then yes the contents of the 'Folder' inside'.
– tiaguinhow
show @Hernandes, it worked in a way. Sorry but I forgot to specify, at http://dominio.com.br/folder. it worked perfectly exactly the way you gave it to me, but in this case I would use a domain that would be http://folder.dominio.com.br. I removed from the file . htaccess the line Rewritebase /Folder and started working, but this not recognizing my style sheets, images, etc.
– tiaguinhow
@tiaguinhow which answer method above you used? let me know to which I can assemble the appropriate answer to your problem
– hernandev
@Ernandes used his . htaccess and left the path as 'public' => DIR.'/../public' because if I put public_html (what is actually the one of the hosting) it does not recognize. The site structure normally uploaded, the problem is in the additional files.
– tiaguinhow
@Hernandes, Flavio gave me a hint to add the public folder on all the Assets (Asset('public/Assets...')) and it worked. Is there a way to change the path of Asset globally ? and the Basset package ?
– tiaguinhow
@tiaguinhow you can put your Assets folder before the public. since it is not the initial folder anymore
– hernandev
sorry @Hernandes, but how do I do it ? And with Basset there is how to configure the default directory too ?
– tiaguinhow
@tiaguinhow your hosting is cPanel / Plesk or similar?
– hernandev
Let us continue this Discussion in chat
– tiaguinhow
In conversation with @Ernandes, we decided to change the hosting to one that has full support for Laravel.
– tiaguinhow