I'm using an repackaged version apache which is called IHS (IBM HTTP Server). Basical the same as apache web serve with other features. What I'm trying to accomplish is to apply the rewrite rule to hide the complicated url with query strings with a shorten url.
Originally when I first test this out with 'R' Flag it work fine. It was able to match the pattern and response with the proper long url by redirecdt to the final url.
eg: https://example.com/us/ABC/123 -> https://example.com/webapp/headerText=ABC&categoryId=123
But after I have remote the 'R' flag, my rewrite failed with message of " File does not exist: /opt/IBM/HTTPServer/htdocs/dmcst/webapp". I'm trying to show the shorten url without given user the full url. The /webapp/.. is not an local path but rather it is a some other remote path. Why would this fail for 'rewrite' but not 'redirect'?
RewriteEngine on Alias /wcsstore "/opt/IBM/WebSphere/AppServer/profiles/dmcwcsst/installedApps/WC_dmcwcsst_cell/WC_dmcwcsst.ear/Stores.war" Alias /wcs "/opt/IBM/WebSphere/AppServer/profiles/dmcwcsst/installedApps/WC_dmcwcsst_cell/WC_dmcwcsst.ear/CommerceAccelerator.war" Alias /static "/opt/IBM/content"
RewriteRule ^/us/([a-z].)/([0-9].)/?$ /webapp/wcs/stores/servlet/AcquisitionBrowseView?langId=-1&storeId=10001&catalogId=10051&headerText=$1&categoryId=$2 [NC,R,L]