Rewrite rule (No Extension)

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 7
Joined: 17 Dec 2012, 11:23
Location: Pennsylvania

Rewrite rule (No Extension)

11 Nov 2016, 12:40

I wish to do a rewrite for any file that does not have an extension

/lighting -> /FindScript.cfm?file=lighting
/plumbing -> /FindScript.cfm?file=plumbing
/toys -> /FindScript.cfm?file=toys
/electronics -> /FindScript.cfm?file=toys

if a file has an extension it should continue to process.

/lighting.HTML would not evaluate
/plumbing.HTML would not evaluate

maybe the easiest way to do this is to evaluate script for no "."

what is the rewrite rule for a script with no period.

Thanks

User avatar
Posts: 7
Joined: 17 Dec 2012, 11:23
Location: Pennsylvania

Re: Rewrite rule (No Extension)

11 Nov 2016, 14:46

It looks like this regex expression will work. Initial tests look good.

RewriteRule /((?![.]).)*$ /FindScript.cfm?file=$1 [L]

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 6 guests