I need to make some rewrite rules, but I doesn't use Apache HTTP for years and little bit confused with rules...Task: rewrite URLs from http://domain.com/test/file.js to http://domain.com/test/1/file.js;if file http://domain.com/test/1/file.js NOT found - return file http://domain.com/test/1/index.html instead;I suppose - it must looks like this:    <Location /test>            AllowOverride All            # if file http://domain.com/test/1/file.js found - return it            RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -f            RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/test/1/$1 [L]            # if file http://domain.com/test/1/file.js NOT found - return index.html form /1/ subdir            RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f            RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/test/1/index.html [L]    </Location>Content of /test/:# ls -ltotal 16drwxr-xr-x 2 root root 4096 Aug 20 10:14 1-rw-r--r-- 1 root root    6 Aug 20 08:57 index.html-rw-r--r-- 1 root root    3 Aug 20 10:06 jj.ll-rw-r--r-- 1 root root   64 Aug 20 08:50 test.htmlAnd /test/1/:# ls -l 1total 12-rw-r--r-- 1 root root 15 Aug 20 11:02 file.js-rw-r--r-- 1 root root 13 Aug 20 10:03 index.html-rw-r--r-- 1 root root  7 Aug 20 10:14 jj.llBut- if I try to open URL like http://domain.com/test/file.js - I'm getting file http://domain.com/test/1/index.html anyway.
mod_rewrite all and if not found
apache httpd;mod rewrite