Rule to redirect non logged in User to Custom Registration/login Page in .htaccess file

I am trying to redirect not logged in users from the "/purchaseads/purchase.php" to custom registration/login url "/purchaseads/registrationurl"on wordpress website. Unfortunately when visit the url "/purchaseads/purchase.php" even as a non logged on user nothing changes, doesn’t redirect to custom register/login form.