mod_rewrite()esque feature in IIS

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

mod_rewrite()esque feature in IIS

Post by Burrito »

is there such a thing?

here's what I need:

Code: Select all

http://www.mysite.com/r34334433
I need to create be able to grab that r34334433 and use it as a parameter and send my users to a different page or whatever based on it's "value"

can this be done with IIS?

thx,

Burr
User avatar
shoebappa
Forum Contributor
Posts: 158
Joined: Mon Jul 11, 2005 9:14 pm
Location: Norfolk, VA

Post by shoebappa »

As far as I know most (all) of the URL rewriting capabilities for IIS are add-ons by third parties and usually not free.

http://www.google.com/search?hl=en&q=IIS+URL+rewrite

It looks like there is a way to do it with 404 error filtering, but they say the ISAPI rewrite add-on is probably worth the money (~$70).

http://www.isapirewrite.com/

http://www.qwerksoft.com/products/iisrewrite/ (~$200 w/shareware version, restricted to 200 requests without restarting the server)

I thought there might be a free one, but couldn't find it.
Last edited by shoebappa on Thu Sep 29, 2005 8:20 pm, edited 1 time in total.
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

mmmm....custom 404 page. Didn't think of that, I'll give it a play tomorrow.

thx,

Burr
User avatar
shoebappa
Forum Contributor
Posts: 158
Joined: Mon Jul 11, 2005 9:14 pm
Location: Norfolk, VA

Post by shoebappa »

There's some discussion here (requires registration with a non-free email address): http://www.webmasterworld.com/forum47/1383.htm
Plumsauce:

Matt,
Set default.asp as the default 404 handler for
the root directory only, using URL and not FILE
as the type. See the management console for this.

When the server sees:

h*tp://www.example.com/mattglet

it will execute:

default.asp?404;h*tp://www.example.com/mattglet

parse the query variable in default.asp using a
regular expression to extract the mattglet part
and carry on.

This is just a variation on custom error pages.

Hint, to get this going during development,
just do a Response.Write of the data so that
you can see what is happening.

using dns wildcards and this method, you can
even do h*tp://mattglet.example.com if you
wanted to.

+++
If that was somehow illegal (against forum rules), let me know. Wanted to save a registration somewhere else...

They also claim it doesn't return an actual 404 header, but a 200 header so it would be useful for Search Engine friendly URLs... I run apache, so I've never done it. I assume you could set it to some PHP page as well... Pretty slick if it works, let me know how it goes.
Post Reply