Im battling to get something right on my live web server.
The scenario:
I recently re-structured my YII project to allow for multiple applications to use the same images/db connection within one project.
"/common" - All images,extensions, models that are shared with the applications.
"/auction" - one of the apps
"/dealernetwork" - another app.
So i have the following apps in my directory in "/var/www/auction"(The above folders are at root directory).
What i would like to do:
I would like to go to my domain www.auctionwebsite.co.za and i would like it to point to my "auction" application. "/auction/www/index.php" and then i would like to remove /auction/www from the url. so that my url will read "www.autionwebsite.co.za/index.php/whatever".
I am trying to do this in my apache config (sites-available) file but I'm not having any luck. I would like my DocumentRoot to be "/var/www/auction" so that i can go back folders "(../../common)" to get images etc etc.
Here is a sample of my failed attempt which is loading the directory but index.php is not fired.
<VirtualHost *:50000>
ServerAdmin webmaster@localhost
ServerName www.auctionwebsite.co.za
ServerAlias auctionwebsite.co.za
DocumentRoot /var/www/auction
RewriteEngine On
RewriteRule ^/$ /auction/www [R]
RewriteCond %{REQUEST_URI} !(.*)auction/www
RewriteRule ^(.*)$ $1 [L]
<Directory /auction/www>
#Options Indexes
#allow from all
#order allow, deny
</Directory>
</VirtualHost>
Thanks a lot.
Use apache Alias:
http://httpd.apache.org/docs/2.2/mod/mod_alias.html#alias