Nginx 404 redirection to error page

Dhanushka Parakrama parakrama1282 at gmail.com
Fri Apr 8 12:14:08 UTC 2022


Hi All

I have simple drupal site running  and i wanted to redirect 404 pages to a
error page , So i  have following configuration in place

error_page  404 https://example.com/page-not-found;

when it try to access non existing  page such as   https://example.com/abc
, then  from nginx page correctly get redirect to the
*https://example.com/page-not-found
<https://example.com/page-not-found>*

But when i try to access non non-existing page ( with extension )  such as
 https://example.com/*abc.js  * it does not get redirected to the
*https://example.com/page-not-found
<https://example.com/page-not-found>  *page .

So is there any way to fix this issue?  , please advice

Thank You
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20220408/29e0e4f4/attachment.htm>


More information about the nginx mailing list