1

Is it possible to redirect all the pages returning a 404 error to the front page?

I am not sure the new Drupal 8 Redirect module (which combines the Drupal 7 version of the Global redirect and the Redirect modules) would help me to achieve this exact task.

2 Answers 2

2

If you go to the Basic Site Settings (/admin/config/system/site-information) and enter in "/" for the default 404 (not found) page does that work for you?

enter image description here

1
  • 2
    This doesn't perform a redirect, it simply displays the homepage while incorrect path would still be in the address bar. For e.g. /nosuch/page would say you are viewing a page at that path while displaying the homepage. The purpose of these settings is so you can show "404 - try these option". A homepage is not a "404" page.
    – imclean
    Commented Jul 5, 2017 at 1:53
0

Couple of points from my system (Drupal8/ELB w/https)

1) Core Option - The core option only gives limited success

/admin/config/system/site-information

2) Community module - Better option seemed to be 'Redirect':

https://www.drupal.org/project/redirect

3) HTACCESS - if you have certain matches etc (eg. .asp/.aspx) : add something like this to .htaccess:

RedirectMatch 301 "\.asp(.*)$"  /

Your Answer

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