Skip Navigation

[Resolved] How to make certain page can only be access from certain website

This support ticket is created 3 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 3 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#1921399

Tell us what you are trying to do?
I want certain page of my website can only be accessed from other website.

Is there any documentation that you are following?
no

Is there a similar example that we can see?
No

What is the link to your site?
etuisyen.my

#1921445

Hello,

Please elaborate the question with more details:

I want certain page of my website can only be accessed from other website.

Are we talking about this:
The certain page(page A) can be see by guest if they are click from a link of some other specific website?
If it is, there isn't such kind of built-in feature within Toolset plugins, you might consider custom codes.

For example, use WP action hook "init" to trigger a PHP function:
https://developer.wordpress.org/reference/hooks/init/

In this PHP function, check if current page is specific page
https://developer.wordpress.org/reference/functions/is_page/
Then get the PHP "HTTP_REFERER" variable
hidden link
Check if it is within those specific websites, if not, then redirect user to other pages, for example 404 page
https://developer.wordpress.org/reference/functions/wp_redirect/