Isapi_rewrite 3: Redirect all non-extension requests to special file handler

103 views Asked by At

I started a new site. In my .htaccess file I thought it would be a simple matter of taking any request that didn't explicitly have a file extension in the request and rewrite to a specific file. So, for example, if the request was:

http://whatever.com/styles.css

or

http://whatever.com/funnyCats.gif

or

http://whatever.com/index.htm

...the rewrite would not apply. However, if I had a request like:

http://whatever.com/funnyCats (anything without a '.')

... I'd reroute to a special handler file. I thought that should be a simple matter of:

RewriteEngine on

# anything without a period in it is not rewritten; got a period? done as is
RewriteRule ^/[^\.]*$ dynamicActionTimeByJerryBruckheimer.php?action=$1 [I]

However, while requests with '.' are served, as expected, dynamicActionTimeByJerryBruckheimer.php is never called when '/funnyCats', 'lolololol', or anything else is requested. I get the generic IIS 404 error.

What am I doing wrong?

0

There are 0 answers