0

I have a WebApplcation which contains a Publishing Site with Variations feature enabled. The follwing is and example url for the site "http://test-server.com/en"

However when I type a wrong url or an error occurs it takes me to PageNotFound error page but the Url changes to the following "http://windows-pc:29420/pages/PageNotFoundError.aspx?requestUrl=http://localhost:29420/en/whatsfa"

I want to Url to point to the following domain name Url is "http://test-server.com/en" and not to local Url like "http://windows-pc:29420/pages/PageNotFoundError.aspx".

How Do I fix this problem?

1 Answer 1

0

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/

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.