Timmah
Timmah

Reputation: 1335

Redirect a URL in Sharepoint 2013 without creating a new page

I've had to update a page's URL in Sharepoint 2013, and now all distributed links to the original URL lead to a 404 error:

Original

http://example.com/abc/Pages/default.aspx

Current

http://example.com/xyz/Pages/default.aspx

Is there any way to redirect abc/Pages/default.aspx to point to zyx/Pages/default.aspx from within Sharepoint?

Upvotes: 0

Views: 15316

Answers (1)

Michael A
Michael A

Reputation: 9900

You can add a script part to the original page with this block of code to redirect users when they land on the page.

<script>
window.location="http://example.com/xyz/Pages/default.aspx"
</script>

It sounds like the default.aspx file has been removed in this original location as well, so you will need to re-add an empty page with the same filename first.

Upvotes: 3

Related Questions