如何将静态 HTML 包含到 Concrete5 中

发布于 2024-12-11 21:15:35 字数 723 浏览 0 评论 0原文

我已成功将 C5 安装到我的主机中,该主机位于“http://www.myweb.com.my”(不是我的真实页面或网址,仅作为示例),请注意,我的 C5 网络域位于 .com 上。我的。

尽管域名是 .com.my,但我安装的 C5 使用了“http://www.myweb.com”的基本 URL,该 URL 也在我的托管中,并且所有 C5 目录都在那里。

我创建了一个不是使用 C5 构建的静态 HTML 页面,我想将此静态 HTML 页面包含到 C5 url 中,即“http://www.myweb.com.my/content/static.html”我这样做吗?

当我尝试使用“http://www.myweb.com.my/content/static.html”时,我不断收到“HTTP错误404.0 - 未找到”,我已经将其上传到我的主机中,该主机位于基本网址中,如下所示“http://www.myweb.com/content/static.html”

我需要配置什么才能使我的 C5 网络识别静态 HTML 并将其显示在“http://www.myweb.com.my/”中内容/static.html”而不是“http://www.myweb.com/content/static.html”?

或者是否可以在 C5 中创建单个页面并将其重定向到我的基本 url 以查看“http://www.myweb.com/content/static.html”,而无需更改浏览器中当前的 C5 url?

提前致谢。

I have successfully installed C5 into my hosting which is in "http://www.myweb.com.my" (not a real page or url of mine, just for example), note that my C5 web domain is on .com.my.

Eventhough the domain is .com.my, C5 that I installed used the base url of "http://www.myweb.com" which is also in my hosting and all the C5 directory is in there.

I've created a static HTML page that is not built using C5, and I would like to include this static HTML page into C5 url which is "http://www.myweb.com.my/content/static.html" how do I do that?

I keep getting "HTTP Error 404.0 - Not Found" when i try to use "http://www.myweb.com.my/content/static.html" which i already uploaded into my hosting which is in the base url as in "http://www.myweb.com/content/static.html"

What do I have to configure to make my C5 web to recognize the static HTML and display it in "http://www.myweb.com.my/content/static.html" instead of "http://www.myweb.com/content/static.html"?

Or is it possible to create single pages in C5 and redirect it to my base url to view "http://www.myweb.com/content/static.html" without changing the current C5 url in browser?

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

孤芳又自赏 2024-12-18 21:15:35

这只是服务器上公共 Web 目录的 content 目录中存在的 HTML 文件吗?如果是这样,那么我认为问题在于您没有正确设置 .htaccess 文件。具体来说,请确保 .htaccess 文件中的“RewriteRule”行上方有这两行:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

这些行告诉 Apache,如果请求的位置存在实际文件,则按原样提供它们,而不是使用后面的 RewriteRule。

Is this just an HTML file that exists inside the content directory of your public web directory on the server? If so, then I think the problem is that you don't have your .htaccess file set up properly. Specifically, make sure you have these two lines in your .htaccess file above the "RewriteRule" line:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

These lines tell Apache that if an actual file exists at the requested location, serve them as-is instead of using the RewriteRule that follows.

可可 2024-12-18 21:15:35

您可以在 single_pages 目录中创建一个简单的页面。里面的所有内容(静态的或 PHP 生成的)将被封装到主题的 view.php 中。然后转到管理并添加您创建的页面。

You can make a simple page in single_pages directory. All content inside (static or PHP generated) will be encapsuled into the view.php of your theme. Then go to admin and add your page created.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文