In a .htaccess file in the subfolder "/preview" (not in document root), I have this rule:
RewriteRule !^public/ /preview/forbidden.php [L,R]
It redirects all /preview/"something" requests that are not in /preview/public/ to the fobidden message.
However, I don't like the fact that the directory name "preview" is in the .htaccess file. I would like to copy the entire website to another folder or server simply by copying the file without having to change the .htaccess file.
So, is it possible to achieve the effect of that rule in some other way?