html <base> tag functionality misunderstood? -


i have simple iis structure:

  • defaultwebsite
    • testapp

defaultwebsite - landing page reachable going 192.168.1.5

testapp - web application reachable going 192.168.1.5/testapp

testapp's index.html

<!doctype html> <html xmlns="http://www.w3.org/1999/xhtml"> <head>     <title>test app</title>     <base href="/testapp/" > </head> <body>     <a href="/">test link</a> </body> </html> 

i'm using base tag set base of app, when clicking on test link expect reload page pointing documents root. not case. clicking on "test link" takes me index of defaultwebsite.

is way how should work or not understanding the base tag correctly ...

the base tag applies relative urls. so, base tag <base href="/testapp/"> following apply.

<a href="/index.html">link</a> 

would refer defaultwebsite.

but

<a href="index.html">link</a> 

would refer testapp.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -