I currently have the following structure in my Zope DB: root | |->articles | |->artists | | | |-> artist1 | |-> artist2 | |-> etc... I want to make it possible to write http://domain.com/artist1 and be sent to artist1 in the artists directory transparently. I figure the easiest way to do this is in Apache via mod_rewrite (correct me if I'm wrong, please :) A solution where all queries to http://domain.com/something would be sent into the artists directory with an exception for http://domain.com/articles would be sufficient. How do I do this in Apache? mod_rewrite is pretty cryptic (for me atleast, apache is not among my most-used applications :) and I'm not even sure if mod_rewrite is the best way of solving it. Any takers? Regards, Alexander Limi
Alexander Limi wrote:
I want to make it possible to write http://domain.com/artist1 and be sent to artist1 in the artists directory transparently. I figure the easiest way to do this is in Apache via mod_rewrite (correct me if I'm wrong, please :)
A solution where all queries to http://domain.com/something would be sent into the artists directory with an exception for http://domain.com/articles would be sufficient.
How will you access/manage objects outside of '/articles'? Using a different domain name? a different port? the raw IP address? In any case, the SiteAccess Product will do what you want. You can make a DTML Method in your root containing: <dtml-if expr="...decide whether to rewrite this request..."> <dtml-call expr="REQUEST.path.append('articles')"> </dtml-if> and set it up as an Access Rule. Cheers, Evan @ 4-am
On Wed, 24 Nov 1999, Alexander Limi wrote:
I currently have the following structure in my Zope DB:
root | |->articles | |->artists | | | |-> artist1 | |-> artist2 | |-> etc...
I want to make it possible to write http://domain.com/artist1 and be sent to artist1 in the artists directory transparently. I figure the easiest way to do this is in Apache via mod_rewrite (correct me if I'm wrong, please :)
Certainly a task for mod_rewrite. Here is my guess: RewriteRule ^/artist1(.*) /usr/local/apache/cgi-bin/Zope.cgi/artists/artist1$1 [t=application/x-httpd-cgi,l]
A solution where all queries to http://domain.com/something would be sent into the artists directory with an exception for http://domain.com/articles would be sufficient.
RewriteRule ^/articles(.*) /usr/local/apache/cgi-bin/Zope.cgi/articles$1 [t=application/x-httpd-cgi,l] RewriteRule ^/(.*) /usr/local/apache/cgi-bin/Zope.cgi/artists/$1 [t=application/x-httpd-cgi,l] Oleg. ---- Oleg Broytmann Foundation for Effective Policies phd@phd.russ.ru Programmers don't die, they just GOSUB without RETURN.
participants (3)
-
Alexander Limi -
Evan Simpson -
Oleg Broytmann