如何重写一个页面重写tomcat

如何重写一个页面重写tomcat

本文介绍了如何重写一个页面重写tomcat?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,我正在尝试使用Rewrite.config将一个页面重定向到另一个页面,但我无法得到我想要的内容。我有三个页面:index.jsp,login.jsp和Newlogin.jsp。我想将login.jsp页面重定向到NewLogin.jsp,但现在它已经通过newloging.jsp交换了所有页面。



请帮助我。



我尝试过:



我在rewrite.config文件中的代码如下:

Hello friends, I'm trying to redirect one page to another with tomcat using Rewrite.config, but I can not get what I want. I have three page: index.jsp, login.jsp and Newlogin.jsp. I want to redirect the login.jsp page to NewLogin.jsp, but now it has swapped all pages through newloging.jsp.

Please help me.

What I have tried:

The code I have in the rewrite.config file is as follows:

RewriteCond %{REQUEST_URI} ^/(css|img|js|partials|rest|favicon).*$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.*$ - [L]

RewriteRule ^.*$ /newlogin.jsp [L,QSA]

推荐答案




这篇关于如何重写一个页面重写tomcat?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 19:58