After asking how to make the URL field of the browser change between different pages on y开发者_开发百科our site here, I understood that to make this happen, I had to switch from using Dropbox as my host to a more proper hosting provider. So, now I have an account at www.000webhost.com, a service which utilizes the cPanel for all the configuration needs.
What I want to do is to create a homepage with different pages, where the URL field of the browser changes whenever you navigate to a new page. However, I would it to say:
"www.myhomepage.com/about/" or "www.myhomepage.com/about"
"www.myhomepage.com/contact/" or "www.myhomepage.com/contact"
rather than
"www.myhomepage.com/about.html"
"www.myhomepage.com/contact.html"
If you're using flat HTML pages, just create those folders /about, /contact, etc. and then place index.html inside. That'll be served up by default when you visit a URL like www.myhomepage.com/about
.
Fancier setups use a content management system (WordPress, ExpressionEngine, Drupal, etc.) and URL masking to achieve the same effect in a different way.
You have to use URL re-writing to make it possible.
for linux hosting do it in htaccess and for Windows Hosting you can do it using web.config as well as Global.asax file..
Try to find out url re-writing for either PHP/ASP .NET ( linux/windows hosting)
Assuming your site is hosted on apache, just create a file in each of those directories called index.html
, and that one will load by default.
精彩评论