Using ../../../
will not work at all, since .htaccess works from the "Base" directory or that you defined as "Base".
By default the Base is the location where the .htaccess is located and in case it can help you to use RewriteBase
to configure the new "Base", note that the path defined in it must be absolute, for example , assuming that pasta/pasta2
is in the apache root, but the .htaccess is in the /etc/www/projeto1/admin/dashboard/pasta/pasta2
folder, then you should do this:
RewriteEngine On
RewriteBase /
RewriteRule ^cena.js$ pasta/pasta2/file.php [L]
The
RewriteBase /
will lead to the root of Apache, in the
/etc/www
case, note that all
mod_rewrite
rules will always start from
/etc/www/
, so you will always work from the new "Base."