Url vs install directory - how to configure

Author Message

George P.

Monday 07 April 2003 7:13:37 am

I installed a test ezpublish in a directory called "portal" which lies in document-root ( html_public/portal/ )

My intention is that users will reach ezpublish by typing only
www.MyDomain.com
or even (I found documentation for multiple site)
http://sub.MyDomain.com
www.MyDomain2.com

How can I achieve this? Redirection? Or must index.htm lie directly in the www-root (no subdir "/portal" also)?

Normally I must type www.MyDomain.com/portal/ to reach the installed ezpublish.
Please someone help me with an simple example.

Gunnstein Lye

Monday 07 April 2003 7:47:33 am

This is very simple, use something like this in your apache config:

<VirtualHost www.MyDomain.com>
<Directory /var/www/html/ezpublish/>
Options FollowSymLinks Indexes ExecCGI
AllowOverride None
</Directory>

RewriteEngine On
RewriteRule !\\.(gif|css|jpg|png|js)$ /var/www/html/ezpublish/index.php

ServerAdmin root@localhost
DocumentRoot /var/www/html/ezpublish/
ServerName www.MyDomain.com
</VirtualHost>

George P.

Monday 07 April 2003 8:55:08 am

Thanks!

But is this possible if I use a Web Hotel? I don't think I have access to apache config files. Maybe using .htaccess in stead?

Scot Wilcoxon

Monday 07 April 2003 12:47:28 pm

It's not index.htm which matters, it is index.php. eZp3 looks at the URL and uses everything before the "index.php" as the current directory. If index.php is visible you should be OK.

(I was having trouble with a similar config, but with index.php hidden. There are problems with that -- I posted a suggestion with a possible fix. Have index.php visible.)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.