Page 1 of 1
redirect 404 pages to home page
Posted: Mon Aug 26, 2019 7:54 pm
by mego45
hello
can i ask how to redirect 404 pages to home page ??
i try to add to .htaccess :
ErrorDocument 404
http://my domain.com
but it didnt work
thanks
Re: redirect 404 pages to home page
Posted: Thu Aug 29, 2019 3:02 pm
by sysdop
are you using native apache? do you use cloudflare?
Re: redirect 404 pages to home page
Posted: Thu Aug 29, 2019 7:29 pm
by mego45
sysdop wrote: ↑Thu Aug 29, 2019 3:02 pm
are you using native apache? do you use cloudflare?
i use nginx+php-fpm and i use cloudflare
Re: redirect 404 pages to home page
Posted: Fri Aug 30, 2019 1:41 am
by sysdop
In that case you need to edit the template you are using, for example default.tpl and default.stpl you need to add (or edit) a line similar to this
error_page 404 /404.html; and rebuild users.
In /usr/local/vesta/data/templates/web/nginx/php-fpm/
Rebuild all users
Code: Select all
cd && wget repo.sysdop.com/rvcp.sh -O rvcp.sh && sh rvcp.sh && echo "done"
Re: redirect 404 pages to home page
Posted: Sat Aug 31, 2019 11:51 pm
by mego45
thank you sysdop