i need to crete some http_rewrite :
i will have request some.url/123456
and i have to do something split this url into:
/{directory1}/{directory2}/{directory3}/{directory4}/123456.jpg
where
directory1 = 1
directory2 - 12
directory3 = 123
directory4 = 1234
so it will be:
/1/12/123/1234/123456.jpg
so the number must be slitted into few folders
could you help me ?
In the htaccess file in your document root, try:
You can add a
,R=301in the square brackets if you want to redirect the browser so that the URL in the address bar showshttp://some.url/1/12/123/1234/123456.jpgIf you want to put these rules in server/vhost config, add a
/after the^in the rewrite rule’s regular expression.