-- Pádraic Brady <[EMAIL PROTECTED]> wrote
(on Monday, 16 April 2007, 09:20 AM -0700):
> I actually noticed a while back the BaseUrl setting isn't needed as
> often - at least my current development and production systems don't
> require it anymore. Hopefully there's a lot less need for it since
> it's a quirky thing to have to manually set for every application.
There were a number of bugs logged against the request object after the
0.6.0 release, and from my experience, and from reports I've seen, in
most instances, fixing those bugs obviated the need for setting the base
URL manually; the request object simply autodetects it.
The one case I know of that still causes issues is when you request
index.php instead of using the pretty URLs when you're actually setup to
do so -- this situation always causes a dispatcher exception, as it
can't find the IndexPhpController class.
As an example, if you have example.com setup with the standard
mod_rewrite rewrite rules, and instead of calling:
http://example.com/
// or
http://example.com/index
// or
http://example.com/index/index
you call
http://example.com/index.php
you trigger the error.
For some reason, I haven't been able to crack that particular nut.
> ----- Original Message ----
> From: Philippe Le Van <[EMAIL PROTECTED]>
> To: Chris Hartjes <[EMAIL PROTECTED]>
> Cc: Zend Framework General <[email protected]>
> Sent: Monday, April 16, 2007 4:44:38 PM
> Subject: Re: [fw-general] Getting ZF to work in a sub-directory
>
> Chris Hartjes a crit :
> >
> > # the others are redirected to the dispatcher
> > RewriteRule ^(.*)$ index.php [QSA,L]
> >
> Hi Chris,
>
> I believe it should be
> RewriteRule ^(.*)$ /api/index.php [QSA,L]
> (but I didn't look for the meaning of all your flags ! )
>
> you will need too :
>
> $controller->setBaseUrl('/api/');
>
> best regards,
> Philippe
>
> --
> Philippe Le Van
> mail : [EMAIL PROTECTED]
> web : http://www.kitpages.fr
>
>
>
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos.
--
Matthew Weier O'Phinney
PHP Developer | [EMAIL PROTECTED]
Zend - The PHP Company | http://www.zend.com/