Rule to redirect non logged in User to Custom Registration/login Page in .htaccess file
RewriteCond %{HTTP_COOKIE} !.*wordpress_logged_in.*$ [NC] RewriteCond %{REQUEST_URI} ^(.*?/?)purchase.php RewriteRule . https://%{HTTP_HOST}%1/registrationurl [L,QSA] This will result in a 302 (temporary) redirect to /purchaseads//registrationurl – note the double-slash. This double-slash is passed through to the $_SERVER[‘REQUEST_URI’] variable that WordPress uses to route the URL. So, this may result in WP not being able to route the request. You … Read more