javascript - Web change hash (#) for slash (/) on url -


i'm making "one-page navigation web" , want know if there's possible replace hash character url slash character. example, have this: www.example.com/#aboutus , want change this: www.example.com/aboutus

but staying in same place, changing position anchor link.

i need change .htaccess, or wich javascript (and derived) function recommended.

thanks in advance , have nice day.

assuming mean spa (single-page application), can take advantage of history api change url without changing pages.

window.history.pushstate(stateobj, "about us", "aboutus") 

and, although think it's supported major browsers, still may want keep hash approach in mind fallback should api absent (yes, i'm looking @ you ie).

additional reference:


Comments