I have a .htaccess file with several instructions. I would like to make it more dynamic, that is, to make it more optimized for other sites without having to edit it.
Lines such as those mentioned below refer to the domain name, would like it to look up the domain name automatically, without the need to quote it.
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$
http://www.nomedodominio.com.br/diretorio/administrador/$1
[R=301,L]
and
ErrorDocument 404 http://www.nomedodominio.com.br/diretorio/administrador/
Note: I need to keep the path after the domain name: / directory / admin / .
Thank you in advance.