Web services 重定向example.com并保留example.com/login

Web services 重定向example.com并保留example.com/login,web-services,dns,subdomain,Web Services,Dns,Subdomain,这可能很明显,但我想将到达example.com的任何人重定向到site.example.com,但我想保持example.com/login的完整性 我可以完成这项任务吗?最好的方法是什么?这不是一项与DNS相关的任务。您正在使用哪个web服务?i、 Apache、Nginx、IIS等。我正在使用Apache。

这可能很明显,但我想将到达
example.com
的任何人重定向到
site.example.com
,但我想保持
example.com/login的完整性


我可以完成这项任务吗?最好的方法是什么?

这不是一项与DNS相关的任务。您正在使用哪个web服务?i、 Apache、Nginx、IIS等。我正在使用Apache。