Rewrite rule (No Extension)
2 posts
• Page 1 of 1
Rewrite rule (No Extension)
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
/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
Re: Rewrite rule (No Extension)
It looks like this regex expression will work. Initial tests look good.
RewriteRule /((?![.]).)*$ /FindScript.cfm?file=$1 [L]
RewriteRule /((?![.]).)*$ /FindScript.cfm?file=$1 [L]
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 5 guests