404 htaccess的重定向不工作 [英] 404 htaccess redirect is not working
问题描述
我正在运行的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.
这篇关于404 htaccess的重定向不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!