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