CSS Linked From //localhost When Viewing Site on Intranet
Posted by: bradonomics (118.175.246.---)
Date: January 15, 2015 05:51AM

I'm trying to share my work with my co-workers. I've put WAMP online, and everyone on the network can see the site in question, but the CSS isn't working. When they view-source of the page (http://192.168.1.127/wordpress/), the CSS files are linked from localhost/wordpress/ instead of the IP address. If they change the URL to the IP address, they have access to the CSS file, but localhost is being generated somewhere. Any ideas where this can be changed?


Windows 7, 64-bit
WampServer Version 2.5
Apache Version 2.4.9
PHP Version 5.5.12
MySQL Version 5.6.17
WampServer icon is green
No active lines inside \etc\hosts file.
I do have access to localhost
I do have have access to phpMyAdmin
I don't run any anti-virus and the only firewall is Windows Firewall.
WampServer is install at C:\wamp\

Options: ReplyQuote
Re: CSS Linked From //localhost When Viewing Site on Intranet
Posted by: RiggsFolly (---.as43234.net)
Date: January 15, 2015 10:16AM

All links should be coded as relative links for example "./css/style.css"

Alternatively, you could set you Apache environment up correctly with a Virtual Host, here is a post to show you how to do that

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.