【问题标题】:How to call sitemap.xml in codeigniter application如何在 codeigniter 应用程序中调用 sitemap.xml
【发布时间】:2016-10-29 01:30:03
【问题描述】:

我已将 sitemap.xml 文件添加到我的 codeigniter 项目中。

我在我的本地主机上这样称呼它:http://localhost/demo/sitemap.xml 它运行没有任何问题。

但是当我在实时服务器上运行它时http://example.com/demo/sitemap.xml 它说找不到 404 页面。

什么是问题?

【问题讨论】:

标签: codeigniter sitemap


【解决方案1】:

您需要在 config/routes.php 文件中添加以下内容

$route['sitemap\.xml'] = 'demo/sitemap'; // your navigation path i.e. your controller_name/function_name

【讨论】:

  • 谢谢,你能解释一下这个函数的代码吗?
  • 对不起,我没听懂你……你想知道什么?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-29
  • 2017-06-17
  • 2021-04-12
  • 2020-01-12
  • 2017-11-23
相关资源
最近更新 更多