开发者

404 htaccess redirect is not working

开发者 https://www.devze.com 2023-03-31 13:06 出处:网络
I am running tomcat on apache 开发者_运维问答we server. I am putting .htacces in project folder inside tomcat/webapps directory.

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

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


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

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


First check if you can use .htaccess file! Second your file(404Redirect.html) related to your document root NOT .htacsess file!

0

精彩评论

暂无评论...
验证码 换一张
取 消