Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to manage access to PHP Custom Pages #273

Open
Gilbertdelyon opened this issue Mar 29, 2023 · 1 comment
Open

How to manage access to PHP Custom Pages #273

Gilbertdelyon opened this issue Mar 29, 2023 · 1 comment

Comments

@Gilbertdelyon
Copy link

Gilbertdelyon commented Mar 29, 2023

I am playing with PHP custom pages to see what I could do with this tool.

I have added my-php-page.php in mysite.xxx/php-pages/global_pages folder and created a new menu item, only for aministrators.
It works!
So far so good.

And now I disconnect from the site, delete browser cookies and enter the url as follows:
mysite.xxx/php-pages/global_pages/my-php-page.php and Ooops, the page is displayed.
This is not at all what I expected. Our site is fully private, you need to be logged in to see most of its content.

Question:

  • Is this behaviour the normal one?
  • How could I protect the php pages so that you can visit them only from the parent site.? ( I am not at all an expert of .htaccess)

Thanks in advance for your precious help.

@Gilbertdelyon
Copy link
Author

Gilbertdelyon commented Mar 29, 2023

In the meantime I found a way with some simple htaccess files. It works for a few simple pages, but...

But the background idea would be to embed a child site in php custom pages (example: a Wordpress site to publish articles that only the parent site authenticated users could see).
So, I would need to protect the child site so that only the users of the HH parent site could see it.
I would appreciate any advice in this matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant