apache - How to configure .htaccess in this way? -


I have successfully installed wildcard and I managed to create dynamic subdomain to work with a simple move

.htaccess:

  option + follow-up clerk rewritingIngine ON reservoir / # * .example.com Rev. & amp; # 37; {HTTP_HOST}! ^ Www \ .example \. Com $ [nc] rewritecount% {HTTP_HOST} ^ ([a-zA-Z0-9] +) \. Example \ .com $ [NC] rewrite% {REQUEST_URI}! ^ /? Subdomain \ .php $ RewriteRule.? Subdomain.php? Subdomain =% 1 & amp; Path =% {REQUEST_URI} [L, QSA]   

There is currently a production of subdomain.php in something.example.com, great.

But I want to do this because I

pre102.example.com/folder/anotherfolder/script.php?param=1

and

show the output of example.com/folder/anotherfolder/script.php?param=1&ppre=102 <>

  rewrite angle% {QUERY_STRING}! Pre = [0-9] rewrite angle% {HTTP_HOST} ^ pre ([0- 9] +) \. Examples \. Com $ [NC] rear array ^ (. *) $ / $ 1? Pre =% 1 [L, QSA]    

Comments