已发送网页链接的内容修改及无个人信息版本访问需求咨询
Hey there! I totally get what you’re aiming for—you’ve shared a link to your site with people who can currently see your personal details, and you want them to access a version that hides that info instead. Here are some practical, actionable ways to make this happen:
Add a query parameter to toggle content
Append a simple parameter to your existing URL, like?personal=false. Then, tweak your site’s code to check for this parameter:- If you’re using front-end JavaScript:
const params = new URLSearchParams(window.location.search); if (params.get('personal') === 'false') { document.getElementById('personal-details-section').style.display = 'none'; } - If you’re using server-side code (like PHP):
if ($_GET['personal'] === 'false') { // Skip rendering the personal details section } else { // Show the personal details as usual }
This way, when people click the modified link, the personal info won’t load.
- If you’re using front-end JavaScript:
Create a dedicated public page
Duplicate your existing page, remove all personal details, and host it at a separate URL (likeyour-site.com/public-view). Then send this new link to the people you’re sharing with. If you want to lock down the original page, you can add basic access controls—like only showing personal details to logged-in users or specific IPs, while redirecting everyone else to the public version.Use conditional content in your site builder
If you’re using a no-code platform (like WordPress, Squarespace, or Wix), most tools let you set conditional visibility for sections. For example, in WordPress, you can use a plugin to hide the personal details section when the URL contains a specific keyword or parameter. In Squarespace, you can use the built-in “conditional visibility” settings tied to URL parameters.
Just pick the method that best fits your technical comfort level—all of these should solve your problem nicely!
备注:内容来源于stack exchange,提问作者IAskQuestion

