RewriteRule ^[^/.]*$ new/$0
everytime i type mydomain.com/somepath/to/somewhere
it throws 404
its supposed to translate to : mydomain.com/new/somepath/to/somewhere
RewriteRule ^[^/.]*$ new/$0
everytime i type mydomain.com/somepath/to/somewhere
it throws 404
its supposed to translate to : mydomain.com/new/somepath/to/somewhere
Whether or not you need a leading slash will depend on if you are doing this in the httpd.conf file or in .htaccess or in a container within httpd.conf.
To avoid rewrite loops you will want to use a RewriteCond to make sure you are not matching new/
Not sure if the $0 syntax works without capturing parentheses?