While I’m developing a new website in php I put all the source code into a directory and then to deploy the site I move the source code into the webhosting .

This way I can host different releases of the same site at the same time.

As a side effect, to access to my web site the URL is not very clean, for example to access the last release of the site (let’s say version v6) a user shall type an address like the following one:

www.mysite.dom/v6/

It would be better if the user could type only

www.mysite.dom/

apache1

to reach this goal with apache2 I make use of the rewrite module, writing the following .htaccess file in the root directory of my web site:

 

RewriteEngine On
RewriteRule ^$ /store [L]

 

Gg1