I've built a wordpress site for a client, but they needed the site temporarily redirected to a different domain. I added the line redirect 302 / https://www.temporary_domain.com
to the .htaccess file. The issue is that while the site is under redirect, I still need to be able to work on the live, original site, by signing into www.original_domain.com/wp-admin. Is there any way I can do this without removing the redirect?
I think as a beginner, you would like to go easy and without coding. If you, then follow up. First of all, install and activate the Simple Website Redirect plugin from Plugins > Add New.
The Simple Website Redirect plugin allows to you redirect an entire website (except the WordPress admin) to another website.
The URL path and query string are preserved when redirecting to the new site. Ideally, the new site would handle any one-off redirects where a URL for an old page should point to a new page. The Redirection plugin is great for this purpose if you have a big site.
Note: If you want to redirect only the homepage to another site, then Redirection plugin can be the simple and best solution for you.
Using the plugin is simple. Head over to Settings > Website Redirect, enter the URL you want to redirect the site to, set the desired redirection type, set the status to ‘Enabled’ and save your changes.
I hope the above method worked for you.