views:

3

answers:

0

I'm using ISAPI_Rewrite, Windows server 2008.

Currently I am rewriting URLs to httpd.ini like this:

 RewriteRule /this-is-my-super-fancy-url/([^/]+)? /foobar/index.html?nid=10$1

Problem is, now we need to remove certain words from the URL, yet still have the request filled. For instance, in the example above if I needed to remove the words super and fancy.

 RewriteRule /this-is-my-url/([^/]+)? /foobar/index.html?nid=10$1

Is there a way to do this easily without rewriting 2 separate URLs? I have around 10k URLs that need to be rewritten. I was hoping not to have to rewrite all new URLs (with and without the words "super" and "fancy".

Also, there is no pattern or reasoning behind the words super and fancy. Sometimes they could appear in that order, sometimes it could be /super-url-this-is-fancy/ and there are cases where either word may not be present in the URL.

I'd appreciate any advice or a point in the right direction. This is the first time I've really had to work with removing words from a URL.