The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> .html in the URL
hotrod
post May 1 2009, 10:52 PM
Post #1


Novice
**

Group: Members
Posts: 22
Joined: 10-November 08
Member No.: 7,079



Hey,

I'm pretty sure this is a stupid question, but I cant seem to figure it out.

As of now whenever I go to a page on my website the url ends with ".html". So, for example if I went to the contact us page of my site the url would be "www.mysite.com/contact-us.html". However, I don't want the ".html" at the end. Now, I know that it ends with this because the file I have for the contact us page is "contact-us.html" But I want to be able to go to "www.mysite.com/contact-us" and access the contact us page because that looks more professional. How do I do that?

Thanks in advance!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post May 2 2009, 12:53 AM
Post #2


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



The easy way is to create a directory called contact-us and to rename contact-us.html to contact-us/index.html (or whatever the default directory index file is on your server). Then you can link to http://example.com/contact-us/ (note the trailing slash).

A more complicated way is to configure your server to configure your server to use content negotiation, so that it sends contact-us.html when it gets a request for contact-us.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
hotrod
post May 2 2009, 01:08 AM
Post #3


Novice
**

Group: Members
Posts: 22
Joined: 10-November 08
Member No.: 7,079



QUOTE(Darin McGrew @ May 2 2009, 12:53 AM) *

The easy way is to create a directory called contact-us and to rename contact-us.html to contact-us/index.html (or whatever the default directory index file is on your server). Then you can link to http://example.com/contact-us/ (note the trailing slash).

A more complicated way is to configure your server to configure your server to use content negotiation, so that it sends contact-us.html when it gets a request for contact-us.



Ah, I knew it was something simple.

Thank you!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 26th April 2024 - 03:30 PM