404 htaccess的重定向不工作重定向、工作、htaccess

2023-09-02 10:11:14 作者:从你的全世界路过

我正在运行的Apache Tomcat的我们的服务器上。 我把.htacces项目文件夹内的tomcat / webapps目录下。 我使用里面的.htaccess以下行404重定向

I am running tomcat on apache we server. I am putting .htacces in project folder inside tomcat/webapps directory. I am using following line inside .htaccess for 404 redirection

ErrorDocument 404 /404Redirect.html

但它不工作。请让我知道这个位置,我应该放置的.htaccess或者如果我在做错误的重定向code

But it is not working. Please let me know the location where i should place .htaccess or if i am doing mistake in redirection code

推荐答案

我有同样的问题。我加入解决了 RewriteEngine叙述上的ErrorDocument 404 /404Redirect.html

i had same problem. I solved it by adding RewriteEngine on before ErrorDocument 404 /404Redirect.html

请确保 404Redirect.html 是在相同的目录的.htaccess 文件。

please ensure that 404Redirect.html is in the same directory as the .htaccess file.