Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

redirect 404 pages to home page

General questions about VestaCP
Post Reply
  • Print view
Advanced search
5 posts • Page 1 of 1
mego45
Posts: 8
Joined: Sun Sep 16, 2018 6:33 pm

Os: CentOS 5x
Web: apache + nginx
redirect 404 pages to home page
  • Quote

Post by mego45 » Mon Aug 26, 2019 7:54 pm

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
Top

sysdop
Posts: 88
Joined: Fri Dec 08, 2017 1:46 am
Contact:
Contact sysdop
Website Skype

Os: CentOS 6x
Web: nginx + php-fpm
Re: redirect 404 pages to home page
  • Quote

Post by sysdop » Thu Aug 29, 2019 3:02 pm

are you using native apache? do you use cloudflare?
Top

mego45
Posts: 8
Joined: Sun Sep 16, 2018 6:33 pm

Os: CentOS 5x
Web: apache + nginx
Re: redirect 404 pages to home page
  • Quote

Post by mego45 » Thu Aug 29, 2019 7:29 pm

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
Top

sysdop
Posts: 88
Joined: Fri Dec 08, 2017 1:46 am
Contact:
Contact sysdop
Website Skype

Os: CentOS 6x
Web: nginx + php-fpm
Re: redirect 404 pages to home page
  • Quote

Post by sysdop » Fri Aug 30, 2019 1:41 am

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"
Top

mego45
Posts: 8
Joined: Sun Sep 16, 2018 6:33 pm

Os: CentOS 5x
Web: apache + nginx
Re: redirect 404 pages to home page
  • Quote

Post by mego45 » Sat Aug 31, 2019 11:51 pm

thank you sysdop
Top


Post Reply
  • Print view

5 posts • Page 1 of 1

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password