I want to do Url rewrite in Tomcat using UrlRewriteFilter
This is the rule would like in mod_rewrite apache
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php/$1 [L]
I’m confused in how to check the request filename if it’s not a file or not a folder in UrlRewriteFilter
Can anybody help me?
You can’t. Well, you can if you’re using version UrlRewriteFilter 3.2 and you will write your own custom class-rule to check for it; but that’s not really what UrlRewriteFilter was designed for.
This definitely belongs in Apache’s mod_rewrite, especially considering that you have
index.phpin your example. Why would that request even be forwarded to / served by Tomcat?