I am trying to rewrite an internal path for specific requests. I have the following URL:

That web page has some Server Side Includes. However this is a web content management system so the files being included reside elsewhere. The SSI line is <!--#include virtual="/wxt/wxt40/head.htm" -->. There is also an alias set up for iw-mount. So I assume that it will try to find that include at I need to remap it to find it at

So I have tried some different combinations for the rewrite with no luck. Here is the last one I tried:

RewriteCond %{ENV:url} ^/iw-mount/.*?/wxt.*$
RewriteRule ^(/iw-mount/).*?(/wxt.*$) $1default/main/common/wxt/WORKAREA/content/htdocs$2

I am pretty good with understanding Regex but I think it is my limited understanding of what Apache rewrite actually does that may be my problem. I read over the docs and looked at examples but they are not clear. So i guess I have 2 qestions:

  1. Am I rewriting URLs or local paths?
  2. Can anyone let me know what is wrong with my rewrite rule above?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.