Can't make RewriteRule in .htaccess

Hello.

I have got a multidomain project. When I save images I have an access to each image from all subdomains. For example:

and so on…

I want to make the following rewrite rule:

SUB.example.com/i/image1.jpg (the request of the image)

example.com/i/SUB/image1.jpg (storage in file system)

directory "i" will be used only for subdomains

Here is my .htaccess file

##############################################################

Options +FollowSymLinks

IndexIgnore /

RewriteEngine on

#NEXT TWO LINES ARE MY PROBLEM

RewriteCond %{HTTP_HOST} ^(.+)\.fashionday\.by\/i/? [NC]

RewriteRule (.*) fashionday.by/i/$2/$1 [L]

if a directory or a file exists, use it directly

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{HTTP_HOST} ^www\.fashionday\.by$

RewriteRule ^(.*)$ h t t p : / / fashionday.by/$1 [R=permanent,L]

RewriteCond %{HTTP_HOST} ^www\.fashionday\.by

RewriteRule ^(.*)$ h t t p : / / fashionday.by/$1 [R=permanent,L]

otherwise forward it to index.php

RewriteRule . index.php

Thanks.