#Why my static site getting redirected to the same page?

5 messages · Page 1 of 1 (latest)

umbral holly
#

Hi Team,

I have created a sample app using astro & after giving build, I can see in network tab that it is getting redirected.

I don't want to redirect & get 302 code. I am just accessing simple route.

#

algebra redirected to algebra/

wind kite
#

In Static Site Generation mode, Astro is generating html files. In the default config, each route gets its own directory. So, a route /algebra is actually /algebra/index.html. Hence the redirect to /algebra/ , the index.html is implied and understood by most web servers.

#

I keep the defaults and ensure that all my links (that I create via code) include the trailing slash