Making a small extension to URLRewrite provider?

Hi, We are creating a globalized EPiServer web site where several different domains will point to the same web site. However, we would like to return different content when robots.txt is requested depending on which domain name/host name the request is made from. For instance, when is requested, we would like to return the content of, and when is requesed, the content of should be returned. This should be transparent to the robot/visitor that actually makes the request. I've managed to do this by adding an event handler in Application_OnStart in global.asax: UrlRewriteProvider.ConvertingToInternal += new EventHandler(UrlRewriteProvider_ConvertingToInternal); In the UrlRewriteProvider_ConvertingToInternal method, I then get the e.Url (UrlBuilder) object and modify the Path property depending on certain rules (Regular expression). Seems to work fine. However, I have a few questions about this. 1. Is this the way you're supposed to modify URLs? Writing your own subclass/implementation of FriendlyURLRewriteProvider isn't neccesary in this case, right? 2. Is the global.asax application_onstart the correct place to add this event handler? 3. Might there be any performance penalty since the UrlRewriteProvider_ConvertingToInternal method is called very frequently? We're thankful for any ideas or input! Thanks, Christoffer
Dec 12, 2007 18:12
You may want to have a look at this:
Dec 13, 2007 22:40
I need to do something similar in 4.62 - is there an equivalent event I can hook into for this?
Mar 06, 2008 15:22
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.