[英]How do I run index.php in a private folder from index.html
I have a website that has a root html at index.html. 我有一个网站,其根HTML位于index.html。 I want to redirect index.html to a php file in a private folder one parent above to run an index.php.
我想将index.html重定向到上面一个父文件夹中的私有文件夹中的php文件,以运行index.php。 This file would then render the html content that I need depending on the request.
然后,此文件将根据请求呈现所需的html内容。 How would I go about this process of getting the index.php from the index.html.
我将如何处理从index.html获取index.php的过程。 The file structure looks like this:
文件结构如下所示:
private/
-index.php
public_html/
-index.html
Try to use this meta code in your index.html 尝试在index.html中使用此元代码
<meta http-equiv="Refresh" content="0; url=/private/index.php">
It's an html redirection actually. 实际上,这是一个html重定向。
If this doesn't work, try to hook in htaccess 如果这不起作用,请尝试挂接htaccess
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.