> Soooo.... the issue is mod_rewrite? The exact same server
> configuration
> that used to work perfectly with previous versions of Agavi?!??
>
> David, Agavi is a great piece of software, but have you tried
> deploying
> it in real world scenarios? I respect you trying to stick to RFC's
> down
> to the letter, but maybe you could throw it open for developer
> discussion first, and find out if it's going to adversely affect
> existing deployments?
>
> What if I want to change the port my webserver runs on? Shouldn't it
> just be a case of editing my apache config? Why should I have to
> change
> my config files in my web app? I don't know of any other framework
> that
> forces the user to do this.
>
> I'm curious why mod_rewrite is nuking the SERVER_PORT. Obviously, if
> there is any way Agavi can automatically ascertain the server port,
> this
> information is going to have to be correct...
>
> /baffled
No, the issue is not mod_rewrite. The issue is that you used to
redirect without a full URI. That is against the spec. The correct
way to redirect, in the past, was:
$response->setRedirect($routing->gen('routename', $parameters, array
('relative' => false));
Since that is a bit of a pain, we added a convenience feature that
prepends protocol, hostname and port name to the given path if
necessary. I think the reason was that people actually had some
issues, since... you guessed it - it was against the spec, and some
browsers didn't support it or whatever. Can't remember.
So basically, you did something wrong, and now Agavi tries to help
you with that. But it doesn't work because your Apache is foobar'd.
It's really not our fault no matter how you look at it.
Changing the port your web server runs on usually is just a matter of
changing httpd.conf. Because like all PHP scripts out there, Agavi
reads SERVER_PORT. But in your case, it's messed up for some reason.
And no, we cannot do anything about it. How could Agavi possibly
guess the port? I'd happy to hear that. Untilsomeone figures out how
to channel witchcraft into code, you have to resort to defining where
to read such data from. Just like those people running their web
servers behind load balancers or proxies.
I'm pretty surprised you didn't stumble across this earlier - <base
href="<?=$ro->getBaseHref()?>" /> is what most people use in their
<head> to get images loading correctly.
David
_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users