1

I'm using laravel 3.x and wamp I have been working for hours to fix the public folder to remove it and I have succeeded. My problem is that when I go to http://laravel.dev css files and js file are not loaded, in my console I get a 403 error NetworkError:

403 Forbidden - http://localhost/laravel/public/laravel/css/style.css

Here's my .htaccess from public folder

<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine On
</IfModule>

<IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

How can I fix it ?

4
  • Can you show us VirtualHost definition in conf file ? Commented Mar 16, 2013 at 22:18
  • Can you please show how you get the localhost/laravel/public/laravel/css/style.css link? Because you should have a link to laravel.dev/css/style.css, not the one before. Commented Mar 17, 2013 at 0:43
  • thank you i've just managed to fix it i forgot to modify the application.php file url site to larave.dev Commented Mar 18, 2013 at 15:38
  • somehow now all other websites in my localhost are now getting 404 not found error but if i remove the config from vhosts and http-conf it's all ok again except the laravel site. Commented Mar 18, 2013 at 15:39

1 Answer 1

1

Navigate to
your-project-folder/app/config/app.php

and replace this line

'url' => 'http://localhost',

with Your New Domain Name.

This problem occurs when you move your Laravel app to a new domain. Example, from your localhost to a live production environment. CHEERS!

Sign up to request clarification or add additional context in comments.

1 Comment

work for me if added base URL directly like above want to use from .env file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.