404 htaccess的重定向不工作

编程入门 行业动态 更新时间:2024-10-27 02:24:21
本文介绍了404 htaccess的重定向不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在运行的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的重定向不工作

本文发布于:2023-10-31 19:20:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1547036.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:重定向   工作   htaccess

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!