1

I have a Web Applcation which contains a Publishing Site with Variations feature enabled. The following is and example URL for the site http://test-server.com/en

However when I type a wrong URL, an error occurs it takes me to Page Not Found error page but the URL changes to the following:

http://windows-pc:29420/pages/PageNotFoundError.aspx?requestUrl=http://localhost:29420/en/whatsfa"

I want the URL to point to the following domain name URL:

http://test-server.com/en

and not to local URL like:

http://windows-pc:29420/pages/PageNotFoundError.aspx

How can I fix this problem?

1 Answer 1

1

Here is PowerShell to set your page not found URL:

$spsite = Get-SPSite "Web site URL"
$spsite.filenotfoundurl
$spsite.filenotfoundurl = "/sites/yoursite/Pages/PageNotFoundError.aspx"

Besides, customizing the 404 Redirection in SharePoint for your reference:

https://www.chakkaradeep.com/2009/06/23/customizing-the-404-redirection-in-sharepoint/

1
  • Thanks for that answer. However I have a Variations site with English and Arabic versions to it. Now I want to have two different Error pages one for Arabic and one for English. How can I achieve that? Jun 19, 2020 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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