tags:

views:

210

answers:

2

I am trying to do url rewriting in sharepoint . I have done something and its working fine but the problem is when I click on by default controls in sharepoint like edit page, approve or any links they are pointing to the old one and not to the new one and because of that I m getting 404 not found.

If anyone is having idea how to solve this in sharepoint .I have seen postback posts of Scott but in that he has mentioned postback with controls you create in asp.net add form browser but what abt existing ones in sharepoint. do I need to add something in the master page.

Any help would really be appreciated.

A: 

You could try overriding SharePoint's default postback handler (javascript function) using either an HttpModule, or by creating a control that replaces the old url for the new one, generating an postback function overide that uses that "translated" url. Then add the control to the masterpage.

Not too sure if this is possible. My guess is that you might run into some request validation issues when you do this.

EDIT: Read scott guthrie article about this subject: article

Colin
I don't wanna use javascript function as if some browser javascript is disabled the rewrite would not work.
Amit
Sharepoint postbacks work through javascript already, because that's just how ASP.NET works. (all postback o through a js function called _doPostBack or __doPostBack, in SharePoint postbacks go through the same function but that's wrapped up in a function called _spFormOnSubmitWrapper). Like I said, standard ASP.NET just works that way.
Colin
ok yah you are write.......so could you tell me in detail means exactly what i need to add in the master page to avoid post back
Amit
A: 

How do you do your rewriting, e.g. what are your rules?

Mine does it in such a way the normal urls still work. Page editing is done through using the normal urls, so you don't get problems like this.

ArjanP