How to mask the extension and file name for a web address?

Asked 2 years ago, Updated 2 years ago, 49 views

Like home page, how do I do it when I see only unique numbers with different addresses, not separated by get and the same file name for each post?

web server

2022-09-21 21:46

1 Answers

https://tailstar.net/board_community_best/19602718

https://tailstar.net/board_community_best/19347311

Are you talking about the URI of the web app that is serviced without an extension like the above address above? If it is correct, each WAS has different methods, so you need to include which WAS you are targeting in the question.

Take Tomcat for example:

    <servlet>
        <servlet-name>dispatcher</servlet-name>
        <servlet-class>com.test.Myservlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>dispatcher</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>

I do it like this. (Exception mapping settings for static resources such as css are omitted)


2022-09-21 21:46

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.