JSP server RESIN's URL redirected exploration

xiaoxiao2021-03-06  54

The simplest is based on the URL conversion of the URL rewriting steering (REWRITE) module in a variety of web servers: This can be mapped into news / 234.html, which can be mapped to news / 234.html in this way of unpacking the program. It looks like an outside and a static link. The RESIN server can be set via WebInfo's web.xml: The power of the URL REWRITE feature has a book.

When I need to map news.jsp? Id = 234 into news / 234.html, simply set the web.xml below the directory where Web-INF is located:

And increase the following statement // This is an additional parameter Set

Other ways everyone can explore themselves, and REWRITE is very powerful. This will be accessed through a link such as 1234.htm to access the original dynamic page.

There are also some benefits through the URL Rewrite:

Hidden background: This is very useful when migrating in the background application platform: When moving from JSP to the ASP platform, for the front desk users, there is no change in the background application; simplify the data check: Because of the image (/ d ) Such parameters can effectively control digital formats or even numbers;

For example, when we need to migrate your application from news.jsp? Id = 234 to news.php? Query = 234, the front desk can remain in NEWS / 234.html. Separation from the application and front desk: Maintain the stability of the URL, and use mod_rewrite can even forward the request to other background servers.

转载请注明原文地址:https://www.9cbs.com/read-117645.html

New Post(0)