where to place redirect from old website to new website

Home Forums BulletProof Security Pro where to place redirect from old website to new website

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #39886


    I have a wp site that will be removed soon, but I still have the domain name.

    Should I add the redirect in cPanel?

    Or as a redirect in the bottom box in the htaccess custom code? (though not sure how to do this for a whole site).

    Or in the rewite engine custom code like this:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^oldsite.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.oldsite.com$
    RewriteRule (.*)$ https://www.some-other-domain.com/$1 [R=301,L]

    many thanks.

    AITpro Admin

    The answer depends on where the old site was installed and your hosting account folder structure. Post that information in your forum reply.

    /public_html/ – is a WordPress website installed in your hosting account root folder?


    Thanks for your quick reply.

    My old site is with another hosting provider installed in the root like this: /public_html/

    And my new site is installed in it’s own sub-folder (GWIOD) like this: /public_html/new-site-installation-folder/


    AITpro Admin

    You would create an htaccess file or use an existing htaccess file in the root hosting account where the old site is/was: /public_html/.htaccess and add your htaccess code that you posted above in that htaccess file.  Note: Since you are redirecting the entire old site to your new site you only need your redirect htaccess code in that htaccess file.


    Brilliant! Thank you.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.