jurij
Sophomore
Just Getting Started
Member Likes (0)
Hi,
please, how can I protect visitors (unregistered users) to visit a link like that: http://domain.com/?wpdmact=process&did=Mi5ob3RsaW5r, where "Mi5ob3RsaW5r" is variable.
The only Q is: What exactly should I set up in URL groups to make this work?
Thanks, Jurij

Responses (10)
Inactive (joined February 2012) Likes (0)
Hello Jurij,
Try adding this to the URL group:
http://domain.com/?wpdmact=process&did=0-9A-Za-z
Make sure:
Strip query strings from URL: is set to NO
Regular Expression: is set to Yes
Am not sure how this will turn out, not really good with Regex.. Let me know how that goes, if it doesn't work, I will get some help from a dev.
Good luck!
Member (joined June 2011) Likes (0)
Hi Arun,
I did it like you directed it.
It do not do a job.
Do we have another sugestion please?
Thanks, Jurij
Member (joined September 2011) Likes (0)
Hi Jurij,
I cannot test it right this moment, but according to the Membership handbook the URL with the regular expression should be like this:
http://domain.com/?wpdmact=process&did=.+
Used in a negative rule for Visitors with the two adjustments Arun already mentioned:
(1) Strip query strings from URL: is set to NO
(2) Regular Expression: is set to Yes
it should prevent visitors from visiting any URL where there is at least one character after the "did="
Emanáku.
Inactive (joined February 2012) Likes (0)
Thanks Emanáku.
I wanted something like that, but couldn't find that anywhere. So .+ means anything after it. Noted.
@jurij can you try that and let us know?
Member (joined June 2011) Likes (0)
Hello,
Thank you both.
I have tested it, but no success.
This URL with variable is generated from wp plugin Download Manager.
Could this be related to bypass Membership plugin functionality?
Kind regards, Jurij
Member (joined September 2011) Likes (0)
Hi Jurij,
so you want to use the plugin "Download Manager" http://wordpress.org/extend/plugins/download-manager/ and the Membership plugin together.
My first question would be: Why? Is the download protection which Membership provides not enough?
And as far as I understand the function of Membership: It hooks into the basic mechanism of displaying pages and posts - and NOT into the web servers handling of URLs.
That means: Membership can detect protected content as long as it is a post, a page or a download which is managed within Membership - but not when there are specific links which are not handled by the "normal Wordpress mechanism".
To see if it can be made working with the Download Manager Plugin would require more work and code analysis ...
Inactive (joined February 2012) Likes (0)
Okay, I give up. Let me ping Barry for a solution for this one. Hang on.
WPMUDEV-ian (joined November 2011) Likes (0)
Heya !
I have sent another note to our lead developer to provide a feedback on this thread.
Thanks a lot for your patience on this one.
Cheers
PC
Developer (joined June 2008) Likes (1)Liked by: 
You need to use regular expressions, and make sure the setting for your url group is set to Yes for regular expressions.
A tutorial for them is here:
http://www.regular-expressions.info/
If you want to pop up a screenshot of the url group you have set that isn't working for you, then we can take a look.
Support Chimp (joined March 2010) Likes (0)
Hey there, hope you are well!
Just checking in to see how things are going and if you need further assistance.
If you do then please feel free to reopen this thread or create a new one.
Take care and have a fantastic day!
Become a member