views:

161

answers:

3

I'm building an isapi filter that will grab any url requests with the prefix "http://localhost/" and redirect that url request to my message page "http://localhost/default.html."

Here's the solution:

if(urlString.Find("/") != -1) { urlString.Replace(urlString, "/default.html");

A: 

Maybe you may use a RegExp to do the job ! : RegexLib.com

Matthieu
+2  A: 

The boost string algorithm library has some effective replace features.

Andy J Buchanan
A: 

the answer is: if(urlString.Find("/") != -1) { urlString.Replace(urlString, "/default.html");

MG