You can create a regular expression redirect to redirect everything:
https://redirection.me/support/redirect-regular-expressions/
You can then create a ‘do nothing’ to exclude certain URLs:
https://redirection.me/support/redirect-actions/
I’m completely, baffled because when I create a redirection I don’t see any of the conditional redirect options shown in https://redirection.me/support/redirect-actions/ – what am I missing?
I have the exact same use case.
Thanks!
Don’t know how I missed that, thanks!
Now I just need to know how to create regular expressions that only matches wp-admin and wp-login so that I can set them to “do nothing”.
I tried these:
^\/((?!wp-admin).)*$
^\/((?!wp-login).)*$
as per this post:
https://wordpress.org/support/topic/301-redirection-wordpress-plugin-redirecting-all-posts-inc-wordpress-login-page/#post-9928402
But that appears to actually be matching everything (e.g. if I visit http://wearekaizen.co.uk/blog/2016/01/to-consult-or-not-to-consult/ which does not have wp-admin in it that redirect’s hit counter still goes up) so I figure it must be incorrect.
Sure, the expression is everything except wp-admin. You want to match wp-admin.
You could try the beta version which does all this for you:
https://github.com/johngodley/redirection/releases/tag/4.7-beta-1
Sure, the expression is everything except wp-admin. You want to match wp-admin.
Doh, yes, I just realised that too!
Would this match it?
`^/wp-admin/(.*)
I may well check out the beta version… or just forget about trying to creating exceptions for wp-admin and wp-login.php and instead just rename/ delete the plugin direction if I need to access the dashboard or remove the redirection for some reason…
Thanks
OK, I installed the beta version and worked out that all I have to do is whack my new domain in Relocate to domain: field under Site tab it it just works – brilliant! I think people are going to love the new version, thanks!