如何更改Codeigniter 4中的文件夹4

发布于 2025-02-13 20:01:10 字数 272 浏览 1 评论 0原文

是否可以更改已构建的旧站点,以便可以通过类似的内容来访问:

旧站点: www.example.com/2021 和新站点: www.example.com

谢谢。

is it possible to change the old site that have been built so it can be accessed by something like this :

old site become : www.example.com/2021
and the new site : www.example.com

Thanks.

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

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

发布评论

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

评论(2

眼中杀气 2025-02-20 20:01:10

您可以更改文档root或可能只需更改config中的路由,请访问 https://codeigniter.com/ USERGUIDE3/GEREME/ROUTING.HTML

You can change document root or maybe just change route in config, visit https://codeigniter.com/userguide3/general/routing.html

云朵有点甜 2025-02-20 20:01:10

打开您的新站点上的项目文件夹。打开并编辑.env新站点的 root项目目录上的文件,然后更改下面的行:

app.baseURL = 'http://www.example.com'

Open the project folder on your new site. Open and edit the .env file at the new site's root project directory and change the line below:

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