In httpd.conf I defined a virtual host like this :
<VirtualHost *:80>
ServerName myproject
DocumentRoot "C:/xampp/htdocs/MyProject/www"
</VirtualHost>
Now I would like a script outside the www folder to be the startpoint of this website.
The script I want to run first is : C:/xampp/htdocs/MyProject/build.php , which then starts doing some work (copying stuff, generating cache, etc.) and then redirects to index.php in the www folder (using a header("location: ...") in PHP).
Is this possible?
UPDATE
This works (put inside VirtualHost) :
Alias /index.php "C:/xampp/htdocs/MyProject/build.php"
Yes, absolutely.
You can put the root anywhere you want – “DocumentRoot” does not need to be under www.
You can put any other directory in any different physical location you want – just use the
<Alias>directive:http://www.thewebhostinghero.com/tutorials/apache-alias.html