简体   繁体   中英

How can I add password protection on a link to a page without creating a new separate file?

I'm using a website builder online (yes I know,) that does not have any password protection features. but can accept background code widgets, I seem to be able to add code to an image functioning as a button. but I'm getting confused on how to achieve it correctly as I cannot add any additional pages like htaccess or js.

I've tried scouring online for script solutions but I'm not sure how to write the onclick event with a function such as this: https://www.freelancer.co.uk/community/articles/how-to-password-protect-a-page-directory#

Put simply, unless the website builder allows you to password-protect the target of the link itself, any code you write to password-protect a button is ultimately irrelevant. A malicious user could still go directly to where you linked to without clicking the button.

What you want to see is if you can put certain pages behind authentication; which, without knowing the website builder you are using, can't really be answered.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM