Not rewriting URLs for existing content using Virtuoso rules based URL Rewriter

206 Views Asked by At

I'm using Virtuoso's rule base URL Rewriter and I want to tell it not to rewrite a URL if a file actually exists at the specified URL. Using Apache and mod_rewrite the relevant RewriteConds would look like this:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

But I can't find an alternative for this in Virtuoso. Any ideas?

1

There are 1 best solutions below

0
On BEST ANSWER

I ended up with a kind of hacky solution to this problem. Instead of a generic "don't match where a file exists" condition I ended up creating new rules ("Rule matching: First matching") above the actual rewrite rule I wanted. These rules specifically excluded directories like "images" etc...