• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Redirect if Site not Found

kraftk

New Pleskian
Hello,

the Structure of my website change very often and google have sometimes old links to subpages. In this case i dont wan't that a visitor of a "old link" get a errorpage like 404. he Should be redirect to the startpage of my site.

There is a Howto at: http://support.hostgator.com/articl...up-custom-error-documents-on-plesk-10-windows

There is in on Option 2 a way to set up a new url for custom error documents.. but i have on my plesk 10.4 on linux not a opinion "virtual directory"..

I found only a checkbox there i can activate or deactivate Custom Errordocuments.

What is the easiest way to redirect all "bad links" / "Site not founds" to the startpage of my website?


Thx a lot.
 
Place the following in a file named ".htaccess" in the root httpdocs directory for the site and change example.com to whatever your site url you want to direct to is.

Options +FollowSymlinks
ErrorDocument 404 http://www.example.com/
RewriteEngine on
 
Back
Top