mod rewrite - RewriteRule assistance -


i maintain (system side) application utilizes ibm htp server , websphere application server (standalone). team wants change made can't figure out need do.

the problem - users enters http://my-site.com/customerfiles/client/subdir/file.pdf his/her browser. site allows file directly sent user, bypassing application code. basically, pdf file gets sent browser , opened. application team application control , send file (if user authorized retrieve file). right now, customer can access other customers' files.

they above url redirected siteinfo getafile?cust=client&filetype=subdir&file=file.pdf

i have test ihs system can play , have coded

rewriterule ^/customerfiles/(\w+)/(\w+)/(\w+)$ http://%{http_host}/xs2/getafile?cust={$1}&filetype={$2}&file={$3} [r=301,l,qsa] 

i enabled rewritelog feature , these messages being issued:

10.17.1.163 - - [14/jul/2015:07:37:02 --0500] [10.17.1.163/sid#474ff0] [rid#6c1620/initial] (3) applying pattern '^/customerfiles/(\w+)/(\w+)/(\w+)$'  uri '/customerfiles/client/subdir/file.pdf'  10.17.1.163 - - [14/jul/2015:07:37:02 --0500] [10.17.1.163/sid#474ff0] [rid#6c1620/initial] (1) pass through /customerfiles/client/subdir/file.pdf  

i novice @ , appreciate while keeping solution rewriterule in configuration file (we don't use .htaccess).


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -