Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使一个站点永久脱机,但在它关闭之前我会在其上显示一个启动页面一两个星期。如何编辑我的 .htaccess 文件以显示该启动页面?它需要允许页面本身(根目录)以及 /images 目录中的两个图像。
将以下配置放入.htaccess网站根目录中:
.htaccess
RewriteEngine On RewriteCond %{REQUEST_URI} !^/splash.html$ RewriteCond %{REQUEST_URI} !^/images/usedimage.png$ RewriteCond %{REQUEST_URI} !^/images/anotherusedimage.png$ RewriteRule .* /splash.html [R=301,L]