htaccess 将所有请求重定向到某个URL地址的规则

代码如下:
RewriteEngine On
RewriteCond %{REQUEST_URI} !=/tempIndex.html
RewriteRule ^ /tempIndex.html [R=301]

参与评论