Try our conversational search powered by Generative AI!

Getting EPiServer to ignore id parameter



My query is slightly removed from the 404 page redirection thread, so I'll keep this separate.

If I get IIS 6.0 to point to my custom error page, and then try to pick up the querystring, I get strange behaviour.

If I try to visit, my rawurl looks like this:;


However, if I use this:

I get this:;

The querystring parameter for id=paramval is cut off. I think it's because this is a reserved querystring parameter in EPiServer.

I MUST be able to get the id querystring val, and can't change what goes in. How can I get to it?

Thanks for any help!

Apr 12, 2010 18:46

This is almost certainly not The Way, but it is A Way:
string id = null;
Match match = Regex.Match(Request.RawUrl, @"\?(?:[^&]*&)*id=([^&]+)");
if (match.Success)
	id = Server.UrlDecode(match.Groups[1].Value);


Someone with more insight into the id parameter handling is more than welcome to point out the right way to handle it.

Apr 13, 2010 11:54

Which version of EPiServer are you using? There is a bug in CMS 5 R2 SP2 which may be related, it also causes problems with non-FURLs. Maybe the id parameter would always be cut in your situation, but it will almost certainly be cut if you're using that version.

Apr 13, 2010 13:00

Thanks very much for getting back in touch guys!

Magnus, that is the version I'm using! Is there any way I can get around it? What's the bug specifically?

Thanks again,


Apr 28, 2010 10:50

For me the problem was that when non-FURLs were requested from a FURL-enabled site, the pages always returned with my framework but void of content. The reason, it turned out, is that the ID parameter is removed by mistake at some stage in the http module chain, so the page template doesn't know which PageData to load the content from. If it is a FURL the URL rewriter puts the ID in the URL, at a later stage I presume, and it is not removed.

There is a hotfix for this non-FURL bug (or, so I've heard at least) available from EPiServer support.

Apr 28, 2010 11:55

Thanks for the tip Magnus, I'll contact support and find out if it's relevant!



Apr 28, 2010 12:10
* 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.