简体   繁体   English

如何让 ovh 从 index.html 而不是 index.php 运行我的网站?

[英]how to make ovh run my website from index.html and not index.php?

i change an already existing website who is hosting by OVH我更改了由 OVH 托管的现有网站

there was a little bit of php but i changed it because the website doesn't need a back-end server to run, front-end javascript is good enough I would like the web site to start with my index.html file because the index.php doesn't need to exist anymore, but I don't know how to do that有一点点 php,但我改变了它,因为网站不需要后端服务器来运行,前端 javascript 已经足够好了我希望网站以我的 index.html 文件开始,因为索引.php 不再需要存在,但我不知道该怎么做

I tried to remove the .htaccess and the .ovhconfig because i thought they was usefull only for the php, and it broke nothing (good to begin) but it doesn't helped for my problem我试图删除 .htaccess 和 .ovhconfig 因为我认为它们仅对 php 有用,并且它没有破坏任何东西(很好的开始)但它对我的问题没有帮助

the .ovhconfig content : .ovhconfig 内容:

app.engine=php
app.engine.version=5.4
http.firewall=none
environment=production

the .htaccess content : .htaccess 内容:

SetEnv PHP_VER 5_TEST
SetEnv REGISTER_GLOBALS 0

(there is another .htacess file with the same content in the parent folder) (在父文件夹中还有另一个 .htacess 文件具有相同的内容)

Add this line to your .htaccess:将此行添加到您的 .htaccess 中:

DirectoryIndex index.html

As it's described here: https://docs.ovh.com/gb/en/hosting/what_else_can_you_do_with_the_htaccess_file/正如此处所述: https : //docs.ovh.com/gb/en/hosting/what_else_can_you_do_with_the_htaccess_file/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从index.html在私有文件夹中运行index.php - How do I run index.php in a private folder from index.html 如何使默认页面home.php代替index.html和index.php - how to make default page home.php instead of index.html and index.php 将默认页面从index.php更改为index.html - Change default page from index.php to index.html Laravel 从 index.php 和 index.html 重定向到域 - Laravel redirect from index.php and index.html to domain 如何使用Shell脚本使'index.php'的优先级高于'index.html'的优先级 - How do i make 'index.php' higher priority than 'index.html' with a Shell script 如何让 Apache 提供 index.php 而不是 index.html? - How to make Apache serve index.php instead of index.html? 对于以表单结尾的单页网站:是否必须将index.html转换为index.php? - For a Single-Page-Website with a form at the end: Do I have to convert the index.html into index.php? 如何使用 index.php 而不是 index.html 在 XAMP 上运行由 create-react-app 创建的 ReactApp? - How to run ReactApp created by create-react-app on XAMP using index.php rather than index.html? index.html index.php重定向+内部服务器错误 - index.html index.php redirection + Internal Server Error Ember CLI:index.php而不是index.html - Ember CLI: index.php instead of index.html
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM