Gossamer Forum
Home : General : Internet Technologies :

Easy RewriteRule

Quote Reply
Easy RewriteRule
If I do this:

RewriteRule widgets /cgi-bin/dynamic.gci [L]

any path name or file name with 'widgets' anywhere in the name will go through dynamic.cgi like a wildcard - widgets, widgetsaregreat will all work ok.

BUT

how is this done if I want only the 1 word widgets recognized to go through dynamic.cgi?

--------------------------------
Privacy Software
Quote Reply
Re: [BLOOD] Easy RewriteRule In reply to
Use regex anchors:

RewriteRule ^/widgets/?$ /cgi-bin/dynamic.cgi [L]

will only rewrite:

http://domain.com/widgets
http://domain.com/widgets/

Cheers,

Alex
--
Gossamer Threads Inc.