Rewriting URLs - Call for precisions.
Hello, Following the example in the Zope Book, is did the following. Configuration : Windows XP Service Pack 1a (needed by apache 2.0.48) Apache 2.0.48 Zope 2.7.0RC2 No network connection Fresh install, no products added. Zope : A Folder with id 'demosite' added at Zope root and containing the autogenerated index_html object A VHM with id 'VHM' added at Zope root, a host created in Windows etc/hosts file 127.0.0.1 www.example.com Apache : Apache 2.0.48 httpd.conf configured with the following NameVirtualHost * <VirtualHost *> ServerName www.example.com RewriteEngine On RewriteRule ^/(.*) http://127.0.0.1:8080/VirtualHostBase/http/www.example.com/demosite/VirtualH... </VirtualHost> when i try to access www.example.com, the index_html is called but the url appearing in the navigator's url box is : http://127.0.0.1:8080/VirtualHostBase/http/www.example.com/demosite/VirtualH... How can i modify the url ? TIA André
andre wrote at 2004-2-7 12:19 -0400:
... A Folder with id 'demosite' added at Zope root and containing the autogenerated index_html object A VHM with id 'VHM' added at Zope root,
a host created in Windows etc/hosts file 127.0.0.1 www.example.com
Apache :
Apache 2.0.48 httpd.conf configured with the following
NameVirtualHost * <VirtualHost *> ServerName www.example.com RewriteEngine On RewriteRule ^/(.*) http://127.0.0.1:8080/VirtualHostBase/http/www.example.com/demosite/VirtualH...
</VirtualHost>
Your rewrite rule lacks a trailing "[P]". Lacking this "[P]", Apache apparently has treated it as a "redirect". That's why you see this URL in your browser. -- Dieter
On Sat, Feb 07, 2004 at 07:49:01PM +0100, Dieter Maurer wrote:
andre wrote at 2004-2-7 12:19 -0400:
... A Folder with id 'demosite' added at Zope root and containing the autogenerated index_html object A VHM with id 'VHM' added at Zope root,
a host created in Windows etc/hosts file 127.0.0.1 www.example.com
Apache :
Apache 2.0.48 httpd.conf configured with the following
NameVirtualHost * <VirtualHost *> ServerName www.example.com RewriteEngine On RewriteRule ^/(.*) http://127.0.0.1:8080/VirtualHostBase/http/www.example.com/demosite/VirtualH...
</VirtualHost>
Your rewrite rule lacks a trailing "[P]".
Lacking this "[P]", Apache apparently has treated it as a "redirect". That's why you see this URL in your browser.
When I add [P] I get a 403 Forbidden error.
-- Dieter
-- John
Back to the list after a 'reply_to' typo. John, I had the same problem and it seem that it was related to the fact that some proxy modules were not loaded (see httpd.conf). see below my mail accidentally sent to dieter instead of the list. --- I guess that this P is related to proxy. I tried with [P,L] i got the same problem because i hadn't load proxy modules, proxy_module and proxy_hhttp_module And now it works well and had it working with proxypass too. Thanks Dieter. André ----
On Sat, Feb 07, 2004 at 07:14:25PM -0400, andre wrote:
Back to the list after a 'reply_to' typo.
John, I had the same problem and it seem that it was related to the fact that some proxy modules were not loaded (see httpd.conf). see below my mail accidentally sent to dieter instead of the list.
--- I guess that this P is related to proxy.
I tried with [P,L] i got the same problem because i hadn't load proxy modules, proxy_module and proxy_hhttp_module
And now it works well and had it working with proxypass too.
Many thanks, for that. It works for me too, now.
Thanks Dieter.
André
----
-- John
Now i'm using _vh_. ... VirtualHostRoot/_vh_something ... so when i call http://www.example.com/my_page, the virtual url in the request is as follow : VIRTUAL_URL 'http://www.example.com:8080/something/my_page' but is it possible to make the browser display the path ? André Dieter Maurer wrote:
andre wrote at 2004-2-7 12:19 -0400:
... A Folder with id 'demosite' added at Zope root and containing the autogenerated index_html object A VHM with id 'VHM' added at Zope root,
a host created in Windows etc/hosts file 127.0.0.1 www.example.com
Apache :
Apache 2.0.48 httpd.conf configured with the following
NameVirtualHost * <VirtualHost *> ServerName www.example.com RewriteEngine On RewriteRule ^/(.*) http://127.0.0.1:8080/VirtualHostBase/http/www.example.com/demosite/VirtualH...
</VirtualHost>
Your rewrite rule lacks a trailing "[P]".
Lacking this "[P]", Apache apparently has treated it as a "redirect". That's why you see this URL in your browser.
On Sat, Feb 07, 2004 at 12:19:44PM -0400, andre wrote:
Apache :
Apache 2.0.48 httpd.conf configured with the following
NameVirtualHost * <VirtualHost *> ServerName www.example.com RewriteEngine On RewriteRule ^/(.*) http://127.0.0.1:8080/VirtualHostBase/http/www.example.com/demosite/VirtualH...
</VirtualHost>
when i try to access www.example.com, the index_html is called but the url appearing in the navigator's url box is : http://127.0.0.1:8080/VirtualHostBase/http/www.example.com/demosite/VirtualH...
How can i modify the url ?
I get exactly the same problem.
TIA
André
-- John
participants (3)
-
andre -
Dieter Maurer -
John Poltorak