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 make first existing file /opt/ibm/test/test.txt , use original directory 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 seems request_filename not resolve /opt/ibm/test/test.txt. served fallback dir:
rewritecond: input='/wcsstore/test.txt' pattern='!-f' => matched maybe should concatenate: /opt/ibm/test%{request_uri} , how remove /wcsstore word before concatenation?
in virtualhost context request_filename same request url, since nothing has been mapped yet. prefix %{document_root}/ poke around, or other explicit path.
to remove "wcstore", use rewritecond split string , use %1 instead of original variable
rewritecond %{request_uri} ^/wcsstore/(.*) rewriterule /var/www/.../%1 ! -f
Comments
Post a Comment