views:

20

answers:

1

I've tried to rewrite my current urls to nicer looking, but encountered a problem with broken relative paths (css/javascripts/img tags and so on)... I wonder what is the best way to fix the broken paths? After reading, I see that probably the best way is just to make all of them absolute (like http:// myhost.com / stylesheets / style.css ), is this the common practice? I'll be happy to hear the pros and cons of this solution and also a better solution if there is one. Thank you!

+3  A: 

I think the easiest is to use absolute URL paths like /stylesheets/style.css. Using such URL references makes them independent of the document’s URL path but doesn’t alter the host name or URL scheme.

Gumbo