Root Relative Links - Not working on phone
Posted by: miso440 (207.179.115.---)
Date: October 01, 2014 08:37PM

Windows 8.1 (64-bit) / iOS 7.1.1 (however many bits an iPhone 5s is)
WAMPSERVER 2.5 (64-bit)
Apache 2.4.9
MySQL 5.6.17
PHP 5.5.12
Green Icon

My httpd-vhosts.conf file excerpt:

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot "c:/wamp/www/domain.com"
ServerName domain.com
<Directory "c:/wamp/www/domain.com">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

Windows host file is also set up in accordance with the sticky, and thank you for posting that information.

The site I'm building works perfectly with root-relative links on the host machine, but when I open up the vhost (as above) and access it with my phone, all the links are broken and I have no CSS or Javascript, just the raw HTML.

I am not using PHP files at all.

I'd like the site to just work on outside machines, so I could show off to my boss, "hey, just go to 123.456.789.123/domain.com and check out how much you wanna give me a raise!" What settings would I have to fuss around with to make outside machines obey my root-relative links logically?

Thank you for your time.

Options: ReplyQuote
Re: Root Relative Links - Not working on phone
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: October 02, 2014 02:12AM

Well you have to arrive at your PC using the 'domain.com' domain name and not an ip address, so Apache can see that and use the Virtual Host definition.

So basically you need to either :-

1. Buy domain.com and get it to point to your routers WAN IP address.

or

2. Get a Dynamic DNS such as DYNDNS.COM and change the Virtual Host definition to use the dynamic dns domain name you pick from their available names.

---------------------------------------------------------------------------------------------
(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
Re: Root Relative Links - Not working on phone
Posted by: miso440 (207.179.115.---)
Date: October 02, 2014 03:39PM

So, if I understand, it cannot be done without spending money to go live? Too bad, thanks for taking the time to answer.

Options: ReplyQuote
Re: Root Relative Links - Not working on phone
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: October 02, 2014 04:10PM

No you can get a Dynamic DNS for free from various places, I use DYNDNS and I think they stil allow one domain for free.

---------------------------------------------------------------------------------------------
(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.