apache rewrite rules brake plone/zope

classic Classic list List threaded Threaded
4 messages Options
David Bear-2 David Bear-2
Reply | Threaded
Open this post in threaded view
|

apache rewrite rules brake plone/zope

I have the following rewrite rules for apache. The intent is all urls that have http://myhost/z2 in them will be redirected/rewritten by apache to the zope instance running on local host.

RewriteRule ^/z2/(.*) <a href="http://127.0.0.1:9080/VirtualHostBase/http/%{HTTP_HOST}:80">http://127.0.0.1:9080/VirtualHostBase/http/%{HTTP_HOST}:80
/VirtualHostRoot/$1 [L,P]

RewriteRule ^/z2dav/(.*) <a href="http://127.0.0.1:9081/VirtualHostBase/https/%{HTTP_HOST">http://127.0.0.1:9081/VirtualHostBase/https/%{HTTP_HOST
}:443/VirtualHostRoot/$1 [L,P]

RewriteRule ^/login_form(.*) https://%{HTTP_HOST}/login_form$1 [NE,L]

There is something that I've left out becuase any attempts to view the plone site through apache are 'messed up', ie the graphics, fonts, style sheets, etc, are not included in the web page. Only some of the content in rendered in the browser. However, when I open the url http://127.0.0.1:9080/ the zope and plone site all works.

any hints on a rule I've left out?

--
David Bear
What's the difference between private knowledge and public knowledge?
Chris Withers Chris Withers
Reply | Threaded
Open this post in threaded view
|

Re: [Zope] apache rewrite rules brake plone/zope

David Bear wrote:
> any hints on a rule I've left out?

View the page, look for the links to the css and the like, check they
are generated with absolute_urls rather than just using fixed paths.

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Pedro Barbosa Pedro Barbosa
Reply | Threaded
Open this post in threaded view
|

RE: apache rewrite rules brake plone/zope

In reply to this post by David Bear-2

Hi David,

 

I use this rewrite rule and everything is working.

 

RewriteRule ^/inescporto/(.*) http://localhost:8080/VirtualHostBase/http/localhost:80/inescporto/$1 [L,P]

 

#login

RewriteRule ^/inescporto/login_form(.*) https://localhost/inescporto/login_form$1 [NE,L]

 

 

Pedro Barbosa

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of David Bear
Sent: terça-feira, 2 de Maio de 2006 21:42
To: plone; zope
Subject: [Plone-Users] apache rewrite rules brake plone/zope

 

I have the following rewrite rules for apache. The intent is all urls that have http://myhost/z2 in them will be redirected/rewritten by apache to the zope instance running on local host.

RewriteRule ^/z2/(.*) http://127.0.0.1:9080/VirtualHostBase/http/%{HTTP_HOST}:80
/VirtualHostRoot/$1 [L,P]

RewriteRule ^/z2dav/(.*) http://127.0.0.1:9081/VirtualHostBase/https/%{HTTP_HOST
}:443/VirtualHostRoot/$1 [L,P]

RewriteRule ^/login_form(.*) https://%{HTTP_HOST}/login_form$1 [NE,L]

There is something that I've left out becuase any attempts to view the plone site through apache are 'messed up', ie the graphics, fonts, style sheets, etc, are not included in the web page. Only some of the content in rendered in the browser. However, when I open the url http://127.0.0.1:9080/ the zope and plone site all works.

any hints on a rule I've left out?

--
David Bear
What's the difference between private knowledge and public knowledge?

Pedro Barbosa Pedro Barbosa
Reply | Threaded
Open this post in threaded view
|

RE: apache rewrite rules brake plone/zope

In reply to this post by David Bear-2

Sorry

 

I just remembered that I have this rule in httpd/conf.d/ssl.conf

 

  # keep authenticated users in HTTPS

        RewriteRule ^/inescporto/(.*) http://localhost:8080/VirtualHostBase/https/locahost:443/inescporto/$1 [L,P]

 

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of David Bear
Sent: terça-feira, 2 de Maio de 2006 21:42
To: plone; zope
Subject: [Plone-Users] apache rewrite rules brake plone/zope

 

I have the following rewrite rules for apache. The intent is all urls that have http://myhost/z2 in them will be redirected/rewritten by apache to the zope instance running on local host.

RewriteRule ^/z2/(.*) http://127.0.0.1:9080/VirtualHostBase/http/%{HTTP_HOST}:80
/VirtualHostRoot/$1 [L,P]

RewriteRule ^/z2dav/(.*) http://127.0.0.1:9081/VirtualHostBase/https/%{HTTP_HOST
}:443/VirtualHostRoot/$1 [L,P]

RewriteRule ^/login_form(.*) https://%{HTTP_HOST}/login_form$1 [NE,L]

There is something that I've left out becuase any attempts to view the plone site through apache are 'messed up', ie the graphics, fonts, style sheets, etc, are not included in the web page. Only some of the content in rendered in the browser. However, when I open the url http://127.0.0.1:9080/ the zope and plone site all works.

any hints on a rule I've left out?

--
David Bear
What's the difference between private knowledge and public knowledge?