Rewrite URL, regex help...

Posted by Tony on Stack Overflow See other posts from Stack Overflow or by Tony
Published on 2011-01-13T19:46:05Z Indexed on 2011/01/13 19:54 UTC
Read the original article Hit count: 236

Filed under:
|
|

Hello,

I am using the following Rewrite URL:

RewriteRule /([^/?.]+) /somedir/somefile.aspx\?Name=$1 [NC,L]

which works great for my use, but I need to restrict it to only act on text that does not contain a filename... for example, if I use the url www.somedomain.com/SomeName it works fine, but it also fires if I use www.somedomain.com/TestPage.aspx

So I am not sure if I need an additional Rewtire rule, or if the current one can be modified to disallow any text with an extension, for example.

Any help with this regular expression would be greatly appreciated.

© Stack Overflow or respective owner

Related posts about regex

Related posts about rewrite