bar*_*oon 32 apache .htaccess configuration redirect
我试图重定向mydomain.com的所有请求,无论它们是这样的:
被重定向到
只要它有mydomain.com,他们应该看到这个页面 - 我们将很快回复消息.
我应该在.htaccess或conf中进行吗?怎么样?
bar*_*oon 51
我实际上最终在ServerFault上找到了答案:
https://serverfault.com/questions/32513/url-redirect-to-another-page-on-the-same-site
"此示例将302将所有网址重定向到"/underconstruction.html":
RewriteEngine On
RewriteCond %{REQUEST_URI} !=/underconstruction.html
RewriteRule ^ /underconstruction.html [R=302]
Run Code Online (Sandbox Code Playgroud)
(翻译为"如果URI不是/underconstruction.html,重定向到/underconstruction.html")" - Tommeh
| 归档时间: |
|
| 查看次数: |
54530 次 |
| 最近记录: |