Current configuration:
Alias /wcsstore "/opt/IBM/WebSphere/AppServer/profiles/demo/installedApps/WC_demo_cell/WC_demo.ear/Stores.war"
Example URL:
http://okdemo/wcsstore/test.txt
How do I make it first look for existing file /opt/IBM/test/test.txt
and use the original directory as fallback?
Tried:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/wcsstore/(.*) /wcsstore-old/$1 [PT,L]
Alias /wcsstore "/opt/IBM/test"
Alias /wcsstore-old "/opt/IBM/WebSphere/AppServer/profiles/demo/installedApps/WC_demo_cell/WC_demo.ear/Stores.war"
But it seems that REQUEST_FILENAME
does not resolve to /opt/IBM/test/test.txt
. Everything is served from the fallback dir:
RewriteCond: input='/wcsstore/test.txt' pattern='!-f' => matched
Maybe I should concatenate: /opt/IBM/test%{REQUEST_URI}
, but how to remove the /wcsstore
word before concatenation?