gpt4 book ai didi

.htaccess - htaccess : how to redirect all pages to a holding page

转载 作者:行者123 更新时间:2023-12-03 07:01:36 25 4
gpt4 key购买 nike

在我们安装第二台服务器的同时,我必须关闭一个站点大约半个小时。使用 .htaccess,如何将任何对 domain.com 的请求重定向到 domain.com/holding_page.php

最佳答案

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !/holding_page.php$

RewriteRule $ /holding_page.php$l [R=307,L]

使用 307(感谢 Piskvor!)而不是 302 - 307 means :

The requested resource resides temporarily under a different URI. Since the redirection MAY be altered on occasion, the client SHOULD continue to use the Request-URI for future requests.

关于.htaccess - htaccess : how to redirect all pages to a holding page,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2361933/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com