I have the following sites:
triplestrata.com
ooo.triplestrata.com <- not actual name.
The former is a static HTML website with some JavaScript and the latter is based on WordPress.
On the WP site in the subdomain, there are page that can only be viewed by registration. To control that, i have a plugin that will block access to restricted pages and lead them to register.
By registering, users get the access to the said areas along with their credentials (user name and password).
On the restricted areas there are some links that lead back to the main site (triplestrata.com), but I wanted people to login once more in order to view them.
People with the link would have to enter their credentials once more and, in case they were not members, they are lead to a 401 page requesting them to register.
This can be easily accomplished on cPanel by password protect the directory containing the member's only files and adding an user along with his/her password.
The problem is that such method is manual, which means that every time a new user registers, I have to go back to the SQL Db to get his/her info and add the new user to have access...
So, my question is: how to make it possible for when a new user registers on the subdomain and gets his credentials added to the SQL database, that information is retrieved from the Db and added automatically to the .htaccess file or whatever that information is stored and when he visits the pages on the static HTML site, he's prompted to login again?
In other words, how to automatically add new user information to .htaccess? Is there a script one could use? I'm sorry for bothering. Thank you.
EDIT If I converted the HTML site to PHP how should I proceed from there? Would it be easier to set this up?