将根目录重写为子目录
我正在尝试让 www.example.com 显示 www.example.com/content/portal/ 上的内容,
我不需要简单的重定向,网址应显示 www.example.com。我已经尝试过该站点的许多重写代码,但它们都只是重定向页面。
顺便说一句,我确实将非 www 网址重定向到 www。
提前致谢。
I'm trying to get www.example.com to show the content at www.example.com/content/portal/
I'm not wanting a simple redirect, the url should show www.example.com. I've tried a number of the rewrite codes from this site but they all just redirect the page.
BTW I do redirect non-www urls to www.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将以下内容添加到站点根目录中的 .htaccess 文件中。
Add the following to your .htaccess file in the root directory of your site.