How to 301 redirect ALL non-existing page to main domain?
<p>I have googled but most uses are when person knows their URLs yet <strong>i want to redirect all possible URLs that give 404/503 errors with 301 to main domain</strong>.</p>

<p>Preferably htaccess since site is html.</p>

<p>So any request to page domain.com/XXXX that doesnt exist should redirect to main instead of giving errors ie:</p>

<p>Not Found</p>

<p>The requested URL /eafsdg was not found on this server.</p>