On 26 Jul 2009, at 10:50, Michal Charemza wrote:
> One thing that I have come across a few times is wanting to generate  
> URLs relative to the base href of a site rather than relative to the  
> document root.

I have found another use for this, relating to caching (although I'm a  
bit of a newbie with the caching thing...)

- I have two directories: 'dev' and 'pub' where one loads the  
development environment and one production. So I have two 'sites'  
running off the same app:

http://localhost/somedir/pub/
http://localhost/somedir/dev/

In each, routing generates urls are generated that relative to the  
document root:

/somedir/pub/myroute/
/somedir/dev/myroute/

If I view a page in 'dev' that has a view that generates some URLs,  
these views are cached. If I then switch to the 'pub' view of that  
page, the page is retrieved from cache, but still has the 'dev' URLs  
in it.

I can workaround this. Although I've not found an 'environment' source  
for caching, I can use configuration_directive, and in index.php set a  
configuration directive to keep the environments separate, but this  
seems a bit of a hack.... is there another way?

Michal.

_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to