Question : Plone rewrite rule

We are running a plone/zope site. Currently we have the main domain setup for it and i can have another domain setup to access one of the subtrees by doing this in the httpd.conf file

<VirtualHost *:80>
    ServerName test.com
    ServerAlias www.test.com
    RewriteEngine On
      RewriteCond %{REQUEST_URI} !^/test.il
      RewriteRule ^($|/.*) /test.il$1 [R,L]
      RewriteRule ^($|/.*) http://127.0.0.1:9080/VirtualHostBase/http/%{SERVER_NAME}:80/franchise/franchiseRootFolder/VirtualHostRoot$1 [L,P]
</VirtualHost>

This works great. I'm now working on a project so that our franchisee's can choose different options on where to point their specialized domain names to. I'm trying to automate this as much as possible and i'm stuck on this problem. What i'd like to do is take the above entry and make it work in a htaccess file.

So in the httpd.conf it would be:
<VirtualHost *:80>
    ServerName test.biz
    ServerAlias www.test.biz
    DocumentRoot /var/www/microsites/test.biz
</VirtualHost>

so that it points to a directory. This way i can upload a microsite, a htaccess forwarder or a serving content under for their plone site. I got everything working except for the plone section. I'd like to do something like the following in a htaccess file:

RewriteEngine On
      RewriteCond %{REQUEST_URI} !^/test.il
      RewriteRule ^($|/.*) /test.il$1 [R,L]
      RewriteRule ^($|/.*) http://127.0.0.1:9080/VirtualHostBase/http/%{SERVER_NAME}:80/franchise/franchiseRootFolder/VirtualHostRoot$1 [L,P]

but it's not working. It rewrites test.biz to test.biz/test.il ok but it then gives me a 404 error. I'm hoping what i want to do is possible. Please help.

Answer : Plone rewrite rule

Webmin don't care of how your zones are organized, ISC bind doesn't require any specific order of zone records and there is not an error to place everything at the end.

So if you are using webmin this will be so. Alternatively you may edit Webmin scripts that modify zone and add your own code that will check comments and put new records into appropriate places.

Otherwise - use manual editing.

Regards,
Arty
Random Solutions  
 
programming4us programming4us