Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account

Absolute vs. Relative paths in HTML <head>

0

52 views

I serve content from a subdirectory on my web server, for example:

http://www.myserver.com/subtree

I notice that the CSS is not rendering correctly, so I look at the source of the HTML file:

<link rel="stylesheet" type="text/css" href="static/stylesheets/style.css"/>

One would expect that browsers such as Chrome or Firefox attempt to find this css at

http://www.myserver.com/subtree/static/stylesheets/style.css

When hovering over the link, I can see that it links me to

http://www.myserver.com/static/stylesheets/style.css

It may be useful to note that I'm using apache's mod_proxy to serve the content from /subtree from another server running on the local machine. However, my reasoning is that the browser doesn't know about this and it looks like the content is coming from myserver.com/subtree so therefore it should look for the resources using the relative path.

What am I missing?

asked June 25, 2011 10:59 am CDT
posted via StackOverflow

0 Answers

Be the first to answer this question

Join with account you already have


Sign in with Twitter account
Sign in with Facebook account
Sign in with Google Friend Connect

Preview
Similar questions