I'm using the following rule to use folders for different versions:
RewriteEngine On
RewriteRule .* - [E=VERSION:020]
RewriteRule ^versions/(.*)$ versions/$1 [L]
RewriteRule ^(.*)$ versions/%{ENV:VERSION}/$1 [L]
I have a structure like:
http://domain.com/versions/020/
http://domain.com/versions/020/th?=1
http://domain.com/versions/020/myfolder/
http://domain.com/versions/020/myfile.html
But the user can see:
http://domain.com/
http://domain.com/th?=1
http://domain.com/myfolder/
http://domain.com/myfile.html
I have a last problem with a slash that shows the version number.
A second entry point is (still working):
But the problem when the user type the url and omit the end forward slash, like this:
The user now see the version number like this:
http://domain.com/versions/020/site/
This is a problem as I don't want the user to find out about other versions.
Any idea how I can solve the problem?