1
Guys, I’m still doing a choir here with Laravel’s addresses. In my environment works well, when I go up to my web environment (kinghost - shared), it works bad. Use PHP 5.6 and Laravel 5.0
What happens is:
My css files in the web environment do not load! I need to point the direct way href="public/css/..." src="public/js/..."
In my local environment, that’s not necessary.
My routes I had to change also the paths:
How it works in the web environment:
Route::get('/nova', 'InstituicaoController@nova');
So on site (which is my expected for web):
Route::get('/instituicao/nova', 'InstituicaoController@nova');
My Web Structure:
-public_html
--foo
--foo2
--instituicao
---app em Laravel
---pasta public do laravel
On the recommendation of hosting, I changed the name of the server.php file to index.php and so Laravel ran.
I tried to put {!! HTML::style('css/app.css') !!}
did not happen.
I added "laravel/framework": "5.0.*"
in Composer.json, within the "require":{
but it also did not happen.
Boy.. Could someone help me? Thanks in advance!
You’re using a shared hosting, right? Try using the panel to point to the public folder directly (without touching anything in the project related to index.php). This should solve the problem.
– Wallace Maxters
In my dashboard I didn’t find anything that does this.. can you do via htaccess? I have 1 in the institution folder and 1 in the public folder. are the same. Are like this:
<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>
– Tchelo Cabral