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?
Add a comment
|
1 Answer
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/