Problems with Laravel uris 5

Asked

Viewed 44 times

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.

  • 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>&#xA; <IfModule mod_negotiation.c>&#xA; Options -MultiViews&#xA; </IfModule>&#xA;&#xA; RewriteEngine On&#xA;&#xA; # Redirect Trailing Slashes...&#xA; RewriteRule ^(.*)/$ /$1 [L,R=301]&#xA; # Handle Front Controller...&#xA; RewriteCond %{REQUEST_FILENAME} !-d&#xA; RewriteCond %{REQUEST_FILENAME} !-f&#xA; RewriteRule ^ index.php [L]&#xA;</IfModule>

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.