How to set up when the domain name www.abc.com is entered, the domain name is automatically added after the domain name index, to www.abc.com/index is displayed on the home page.

after the browser enters the www.abc.com domain name,
automatically becomes www.abc.com/index , and
if you enter www.abc.com?test=test ,
automatically becomes www.abc.com/index?test=test
how is this set?


Route redirection
react-router Route Writing (import basic components first)

  <HashRouter>
        <Switch>        
         
          <Route path="/index"  component={home} />
          <Route path="/record" component={record} /> 
          <Redirect from="/" to="/index"  />
        </Switch>
      </HashRouter>

vue-router

 {
      path: '/',
      redirect: '/index',
},
{ 
      path: '/index',
      name: 'index',
      component: home,
    
}
Menu