RewriteEngine on RewriteOptions MaxRedirects=1 RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^([a-zA-Z0-9_-]+)$ ?fh=Shortchain&uid=$1 [L] ErrorDocument 404 /404.html

在上述代码中,添加了'ErrorDocument 404 /404.html'一行。这将告诉 Apache 在发生 404 错误时,重定向到 404.html 页面。你可以将'404.html'替换为你自己的 404 错误页面的路径。确保你的 404 页面位于网站的根目录下。

Apache 伪静态配置:添加 404 错误页面

原文地址: https://www.cveoy.top/t/topic/PS7 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录