【发布时间】:2020-11-15 13:50:45
【问题描述】:
我有一个只有一个网页的Detroit iOS & Android Mobile App Development 网站:index.html。
本站源代码为here。
我不想显示 404 错误页面,而是想将用户重定向到 thefirstprototype.com,如果他们尝试去其他任何地方或尝试在之后放置任何内容。
例如:
- mail.thefirstprototype.com 将用户带到 thefirstprototype.com
- thefirstprototype.com/mail 将用户带到 thefirstprototype.com
我知道可以使用根文件夹中的.htaccess 来完成此操作,但我不确定如何操作。有很多教程展示了如何在不同域之间进行操作,但对我的具体情况没有任何帮助。我该怎么做?
谢谢
Edit1:请注意,我没有使用任何 CMS,例如 Wordpress。我只是普通的 FTP 来将静态 HTML、CSS、JS 网页推送到托管服务器
【问题讨论】:
标签: .htaccess redirect http-status-code-301 http-redirect