Forum Moderators: open

Message Too Old, No Replies

301'ing pages with a certain name

how to do it?

         

giggle

10:04 am on Aug 1, 2007 (gmt 0)

10+ Year Member



Hi

I need to 301 all pages that have a particular naming convention.

For example all pages that are called?_this_page.asp

I need to 301 all the pages that end with _this_page.asp.

Is there anyway that I can do this using IIS?

Thanks

Mick

WesleyC

3:24 pm on Aug 1, 2007 (gmt 0)

10+ Year Member



Your best bet is through an ISAPI rewrite filter. IIS's default 301 redirection support isn't powerful enough to accomplish this easily.

giggle

7:18 am on Aug 2, 2007 (gmt 0)

10+ Year Member



Thanks Wesley

I've found ISAPI/Rewrite by HeliconTech that seems to fit the bill (trying the free version first to see if that will do it).

Don't know why it's so complicated (or my brain's too small) but I can't seem to get the code to 301 any files that end in "_these_last_words.asp" back to our home page.

I've searched Google for code examples but I'm not having much luck. Do you happen to know of a good source of code examples for that type of rewrite?

Thanks again

Mick

WesleyC

1:04 pm on Aug 2, 2007 (gmt 0)

10+ Year Member



I know it's possible, but I'm not sure of the exact syntax as I've never worked with this product. However, the product you picked looks like it mimics Apache's mod_rewrite abilities and syntax--see if you can Google up any tutorials on that, as it's a very well-known technology. :)

Edit: May have found something.

RedirectMatch 301 (.*)_my_page_ending.asp$ http://www.example.com/

[edited by: WesleyC at 1:07 pm (utc) on Aug. 2, 2007]