0

At the moment my netbean project running in glassfish server is showing http://localhost:8080/projectname/index.html

I need this changed to http://localhost:8080/homepage

How do I change this url in the title bar.

Or is the only way to make a .htaccess file which needs to be encrypted by placing .htpasswd in WEB-INF etc. Or maybe there is a plugin.

Let me know, thanks in advance

Dave

Dave
  • 1
  • 2

1 Answers1

0

Ive solved this problem by using in HTML5 history.pushstate(null, "title", new url") This only renamed index.html index-1 etc. So in netbeans if you right click on the project --> go to properties --> and go to RUN... you can change the context path and delete the project folder so you get http://localhost:8080/homepage not http://localhost:8080/project/homepage.

To follow from this I need some further advice which google is not providing. I want to redirect to an anchor tag in the page such as href=" /index6.html#content". However using history.pushstate() means the anchor tag is ignored and will always direct the page to the pushstate values. Anyway around this?

best regards

David

Dave
  • 1
  • 2