hi Grant,

I tried '/', but the problem is then it will only return the base url
and not the absolute url to the view. I found two possible hacks to
solve this

1. $absolute_url = Router::url('/', true) . Router::url('', true) --
however the problem with this one is that introduces two slashes
before the controller ..for instance, the result looks like something
this http://localhost/mysite//controller/action/params

2. $absolute_url = FULL_BASE_URL . Router::url('', true) - this works
fine..but I am not sure whether using constants directly at the
application level is a good idea.


Regards,
Ritesh

On Nov 1, 7:14 pm, Grant Cox <[EMAIL PROTECTED]> wrote:
> Try using '/' as the url parameter, not ''.
>
> On my test app:
> Router::url('', true) =>  "/cake1.2/posts"
> Router::url('/', true) => "http://localhost/cake1.2/";
>
> I admit this is surprising - I understand the "posts" being included
> (as that was the action I was testing), but it still should have given
> an absolute url.
>
> On Nov 2, 5:27 am, bingo <[EMAIL PROTECTED]> wrote:
>
>
>
> > hi,
>
> > I am trying to get absolute url location of a page. I tried using
> > Router::url("", true) but that always returns me a relative url. On
> > debugging, it seems although Router returns absolute url, somewhere
> > its getting converted to relative url. I am calling Router class
> > within my helper code. Hopefully, someone can help me with this.
>
> > Regards,
> > Ritesh- Hide quoted text -
>
> - Show quoted text -


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to