Encrypted access page

How can I add a passcode feature to access some pages of my website?


Ekran Resmi 2021-04-25 15.50.16 Uploading: login.png…

It’s not a Sparkle feature currently. It’s a feature that has been very requested though.

I hope it will be uploaded as soon as possible
thanks :raising_hand_man:t3:

note :wink:
I would be happy to share it if you get information that would work for me with pratic embed code solutions.

Most protected pages work on the basis that someone logs into your site with a username and password. When this happens a temporary code is generated that gets appended to the URL of the protected page. The page itself (usually a PHP page) will check that the code generated matches the code it’s expecting to allow access. If it does, the PHP page will be displayed. If it doesn’t, the user is commonly redirected to a page explaining that they are not authorised to view the page.

This is usually handled by a server-side script which has to be installed on your server. Furthermore, your protected pages usually have to be PHP pages (which Sparkle allows you to create). The reason it is usually a PHP page is because PHP is a sort of programming language that allows for a wide range of functions to be executed when the page loads in a browser. In the case of a protected page, there will be a piece of code at the very top of the page that does the checking before allowing access. This isn’t possible on normal HTML pages.

There are many scripts available that not only allow for this functionality, but also allow your visitors to sign up to gain access (with or without payment). If you have such a script installed, the process is quite simple to implement. The alternative is to use your host’s cPanel feature to create protected directories. This option prompts the user for a username and/or password when they link to any page in that directory. It’s not an infallible system, but may work well for some people.

Hello Erkan,

did you try .htaccess? I had to lock a part of my website and very nice guys here from the forum gave me this hint.

It is not exactly like your picture but it pops up a separate small window asking for user and password.

Kind regards

Bildschirmfoto 2021-04-25 um 19.25.24