The Not Enrolled Redirect module is particularly useful if you want to redirect non-enrolled users to a sales or purchase page rather than the standard course page which may not be optimized for course sales.
The Not Enrolled Redirect module lets you set a URL that users will be redirected to if they attempt to access a course that they are not enrolled in. When activated the module adds a field to the Edit Course screen that enables you to specify the redirect URL. This redirect affects all users who are logged-out as well as all logged-in users that are not enrolled. The redirect does not apply to Administrator users.