Support the ongoing development of Laravel.io →
posted 11 years ago
Configuration

My Laravel site is hosted on a IP to which I am redirecting a URL. The problem is that index page loads but all the css, js and images are being loaded from the IP and not the URL. Even all the internal links are going to that IP. Is laravel creating URLS based only on host IP instead of taking Request URL into acount.

Eg: Suppose my host IP is 1.2.3.4.5 and my URL to access it is abc.com Then If I load abc.com page opens but the js css and images are coming from 1.2.3.4.5/.. instead of abc.com/... And links are going to 1.2.3.4.5/contact instead of abc.com/contact

I am using laravel's methods to make these URLs

Last updated 3 years ago.
0

Are you using some kind of proxy? In that case you could set the trusted proxies.

Last updated 3 years ago.
0

There is configuration for server adress somewhere in laravel so i guess that's set to http://IP If im not wrong its in app configuration

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

alok108 alok108 Joined 6 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.