php - Laravel takes server IP to load files and link URLs instead of accessing the requested URL -


my laravel site hosted on ip redirecting url. problem index page loads css, js , images being loaded ip , not url. internal links going ip. laravel creating urls based on host ip instead of taking request url acount.

eg: suppose host ip website 1.2.3.4/xyz , url access sub.abc.com/xyz if load sub.abc.com/xyz page opens js css , images coming 1.2.3.4/xyz instead of sub.abc.com/xyz , links going 1.2.3.4/xyz/contact instead of abc.com/xyz/contact

i using laravel's methods make these urls

note: xyz folder being proxypassed ip

ok laravel irc chat got know problem server configuration.

thinking on configuration guess happening , causing problem

we type sub.abc.com/xyz should go abc.com-->sub-->xyz folder request url sub.abc.com/xyz

but in folder there no website files instead request(proxypassed) made location 1.2.3.4/xyz should folder xyz on 1.2.3.4 request url becomes 1.2.3.4/xyz

so when comes laravel @ 1.2.3.4/xyz, request url 1.2.3.4/xyz , not sub.abc.com/xyz files , links laravel returned url of 1.2.3.4/xyz

hence page comes browser has 1.2.3.4/xyz links instead of requested sub.abc.com/xyz may if whatever said true why dont domain , corresponding ip breaks in websites.

for

lets type xyz.com points 4.5.6.7 ip. here again website gets request url 4.5.6.7 , sends file @ same link again ip 4.5.6.7 mapped xyz.com , served browser brwser gets correct link.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -