Redirect WordPress Site

Hi,

How can I redirect a complete WordPress site? I want it so that when someone visits domain.com they are sent to otherdomain.com, but I can still access domain.com/wp-admin.

Thanks,
B

  • Alex Stine
    • System Administrator

    Hello Benji
    Hope you are well today!

    I found this snippet and thought it might be worth a try. Please add this code to your .htaccess file. You will have to access your site via FTP or web based File Manager.

    # Redirect Front End Of WordPress
    # List your paths below that should still be accessible
    RewriteCond %{REQUEST_URI} !^/wp-admin
    RewriteCond %{REQUEST_URI} !^/wp-includes
    RewriteCond %{REQUEST_URI} !^/wp-login
    RewriteCond %{REQUEST_URI} !^/wp-content/uploads
    RewriteCond %{REQUEST_URI} !^/wp-content/plugins
    RewriteCond %{REQUEST_URI} !^/wp-content/cache
    RewriteRule (.*) http://example.com/ [R=301,L]

    Be sure to change http://example.com/ to your new domain.

    Hope this helps!

    Cheers,
    Alex :smiley:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.