You turn it off -- just comment out some code in HTTPResponse.py -- but who knows what the side effects might be. I asked about this some time ago and my impression was that nobody knows exactly why it's there. Maybe some (obsolete?) peculiarity with DTML, I dunno. -- Alexander Staubo http://www.mop.no/~alex/ "`Ford, you're turning into a penguin. Stop it.'" --Douglas Adams, _The Hitchhiker's Guide to the Galaxy_
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Christian Andreassen Sent: 10. juni 1999 20:47 To: zope@zope.org Subject: [Zope] Why base href?
For some reason, Zope sometimes add a <base href=> tag in HTML documents. When Zope is used in combination with Apache and Apache is configured to rewrite incoming requests to a Zope folder that is not the root folder, this will cause trouble if there are any relative URLs in the documents. The way Zope determines the URL in the base href in combination with the way Apache rewriting works will often, after clicking around the site a few times, lead to something like www.mysite.org/mysiteroot/mysiteroot/mysiteroot/somedoc in the address line of the browser. It looks ugly, it tricks the browser from caching documents properly and visited links will look unvisited.
Does anybody know why <base href> is inserted automatically? Any tricks for turning it off?
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(For developer-specific issues, use the companion list, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
Alexander Staubo wrote:
You turn it off -- just comment out some code in HTTPResponse.py -- but who knows what the side effects might be.
It will break lots of things.
I asked about this some time ago and my impression was that nobody knows exactly why it's there.
I do. :) Zope often adds steps to the URL path, for example when handling: - index_html, - :method form variables, - Special HTTP methods (snip)
When Zope is used in combination with Apache and Apache is configured to rewrite incoming requests to a Zope folder that is not the root folder, this will cause trouble if there are any relative URLs in the documents. The way Zope determines the URL in the base href in combination with the way Apache rewriting works will often, after clicking around the site a few times, lead to something like www.mysite.org/mysiteroot/mysiteroot/mysiteroot/somedoc in the address line of the browser. It looks ugly, it tricks the browser from caching documents properly and visited links will look unvisited.
The right way to deal with this is to get Zope to participiate in the rewriting. For example, if you get Apache to rewrite: http://foo.com to Zope/foo then Zope needs to be told that (for whichever requests apply): the Server URL is: http://foo.com and any URLs that begin: Zope/foo should have the Zope/foo removed. This doesn't just impact the base HREF. It also impacts special variables like URLx. Jim -- Jim Fulton mailto:jim@digicool.com Technical Director (888) 344-4332 Python Powered! Digital Creations http://www.digicool.com http://www.python.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
On Thu, Jun 10, 1999 at 08:54:38PM +0200, Alexander Staubo wrote: I'm having a similar problem. I'm running zope behind apache on port 9673. And I'm using a rewrite rule to redirect anything under http://mysite.com/mydir into http://mysite.com:9673/mydir After the first page load, zope puts in the base tag as http://mysite.com:9673/mydir and all subsequent links on the page use that. I really want to hide the :9673 in the url so does anyone have ideas? thanks, Kevin
You turn it off -- just comment out some code in HTTPResponse.py -- but who knows what the side effects might be. I asked about this some time ago and my impression was that nobody knows exactly why it's there. Maybe some (obsolete?) peculiarity with DTML, I dunno.
-- Alexander Staubo http://www.mop.no/~alex/ "`Ford, you're turning into a penguin. Stop it.'" --Douglas Adams, _The Hitchhiker's Guide to the Galaxy_
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Christian Andreassen Sent: 10. juni 1999 20:47 To: zope@zope.org Subject: [Zope] Why base href?
For some reason, Zope sometimes add a <base href=> tag in HTML documents. When Zope is used in combination with Apache and Apache is configured to rewrite incoming requests to a Zope folder that is not the root folder, this will cause trouble if there are any relative URLs in the documents. The way Zope determines the URL in the base href in combination with the way Apache rewriting works will often, after clicking around the site a few times, lead to something like www.mysite.org/mysiteroot/mysiteroot/mysiteroot/somedoc in the address line of the browser. It looks ugly, it tricks the browser from caching documents properly and visited links will look unvisited.
Does anybody know why <base href> is inserted automatically? Any tricks for turning it off?
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(For developer-specific issues, use the companion list, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(For developer-specific issues, use the companion list, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Alexander Staubo -
Jim Fulton -
kevin@beatseek.com