Last question on friendly URLs.

These are very easy to generate and parse, thanks to the tips I've gotten here on NYPHP, but I ran into one very strange detail and I'm sure I'm not the first human being to hit this problem.

It seems that relative links to CSS and JS all suddenly break. So if you have:

www.example.com/friendly/varname/varvalue/varname/varvalue

and you have a link to "css/main.css", then it will not be able to find the style sheet anymore.

So it seems natural enough to make the link dynamic, but then I stumbled over finding the "stem" as it were. Without friendly URLs I have code that does not need to know its own site name, it works from context to build links. But with this stuff going in it got really nasty trying to do that.

Has anybody else run into this, or rather, what are the standard solutions?
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to