• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

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