在 WordPress 网站中打开 .html 文件 [英] Open .html file in WordPress website

查看:38
本文介绍了在 WordPress 网站中打开 .html 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 WordPress 网站上上传了 .html 格式的popup-menu.html"文件.

I have WordPress website in which I uploaded "popup-menu.html" file which is in .html format.

当我访问 url "http://testproject.co/projects2015/prismic_new/wordpress/popup-menu.html" 显示 404 错误.

When I visit url "http://testproject.co/projects2015/prismic_new/wordpress/popup-menu.html" is shows 404 error.

我将 HTML 文件上传到我的主题目录中.我想我应该把它上传到我的根目录,但这行得通吗?

I uploaded HTML file into my theme directory. I think I should have upload it to my root directory, but will that work?

我很好奇为什么我看不到那个文件.关于 WordPress,我忽略或不知道某些事情.请帮我解决这个问题.

I am curious why I am not able to see that file. There is something I am ignoring or don't know about WordPress. Please help me with that.

推荐答案

如果您的服务器上需要有一个静态的非 WordPress 文件,您可以将它放在根目录中,就像另一个文件一样,并且可以轻松访问它从网址.WordPress 不会干扰该网址.

If you need to have a static , non WordPress file on your server you can have it on the root directory , just as another file, and can easily access it from the URL . WordPress will not interfere with that url.

WordPress .htaccess 不会尝试在存在于主根文件夹或任何位置的任何文件或文件夹上实施其重定向规则.

WordPress .htaccess will not try to implement its redirect rules on any FILE or FOLDER which exists on main root folder or anywhere.

所以如果例如您需要/static.html ,您可以安全地将其上传到您的同名根文件夹中,并且可以从您的浏览器访问,WordPress 将与它无关.

So if e.g. you need /static.html , you can safely upload it on your root folder with the same name and can access from your browser, WordPress will have nothing to do with it.

你不需要像开始时那样把它放在 themes 文件夹中.

You do not need to put it in themes folder as you have done in the start.

这篇关于在 WordPress 网站中打开 .html 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆