0

I'm trying to redirect to from a web page in sharepoint site to another page. I want once the users go to this page /pages/voice.aspx it should redirect them to google home page. This is my code: I'm using IIS Rewrite Module

<rewrite>
        <rules>
            <rule name="test" patternSyntax="ECMAScript" stopProcessing="true">
                <match url=".*" negate="false" />
                <action type="Redirect" url="http://www.google.com" appendQueryString="false" />
                <conditions>
                    <add input="{HTTP_HOST}" pattern="/Pages/Voice.aspx" />
                </conditions>
            </rule>
        </rules>
    </rewrite>

then when I access the page, it wont redirect to google home page and no error message was shown on screen.

If there's an alternative way to do the same, please share. I have followed the same steps in this answer but still no luck Immediate Redirect page in sharepoint

I also have tried

<meta http-equiv="REFRESH" content="0;url=http://www.yoururl.com">

but it doesnt redirect, the page remains the same.

I have used 'Redirect' page template in sharepoint but I think its slow for the end user as it needs 5 seconds. I want something instant.

0

I suggest adding a Content Editor Web part to the page you want to redirect from, and add the following piece to it. Just tested it on my page and it worked.

<meta http-equiv="refresh" content="5;url=http://google.com"/>
  • On my page it doesn't work, I'm not sure why. – ELS Mar 21 '16 at 19:49
  • Because meta tags have to be in the HEAD of an HTML document, and your CEWP places content in the BODY... Look for JavaScript document.location usage – Danny '365CSI' Engelman Mar 21 '16 at 20:02
  • Maybe put the code in a text file. Then point the CWEP to that file. Prevents SharePoint from modifying the code. – Jammin4CO Mar 21 '16 at 20:19
  • Can't I have something like non existing page for example: domain/voice and when the user access that page, instead of giving not found, it'd redirect to a link google.com – ELS Mar 22 '16 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.