Old 24-07-2006, 10:38   #1 (permalink)
AaronCain
I'm Naked Right Now.
 
AaronCain's Avatar
 
Join Date: Oct 2003
Location: Toledo, Ohio
Posts: 44
html without the html

I am looking to have a html page work in a browser without the actual ".html" extension at the end of it. Any ideas or links on how to do this? Thanks.
  Reply With Quote
Old 24-07-2006, 10:58   #2 (permalink)
MikeMackay
Everything is fine.
 
MikeMackay's Avatar
 
Join Date: Feb 2005
Location: Witham & London
Posts: 764
Send a message via MSN to MikeMackay Send a message via Skype™ to MikeMackay
Place it in its own folder on your server and have it as the index page, then you can link to it without showing the extension, like this:

somedomain.com/somefolder/

- Mike
  Reply With Quote
Old 24-07-2006, 11:10   #3 (permalink)
AaronCain
I'm Naked Right Now.
 
AaronCain's Avatar
 
Join Date: Oct 2003
Location: Toledo, Ohio
Posts: 44
Quote:
Originally Posted by MikeMackay
Place it in its own folder on your server and have it as the index page, then you can link to it without showing the extension, like this:

somedomain.com/somefolder/

- Mike

Brilliant! Thanks.
  Reply With Quote
Old 25-07-2006, 06:56   #4 (permalink)
FakeFrench
Fool
 
FakeFrench's Avatar
 
Join Date: Jun 2005
Location: Finsbury Park, London
Posts: 66

Quote:
Originally Posted by AaronCain
I am looking to have a html page work in a browser without the actual ".html" extension at the end of it. Any ideas or links on how to do this? Thanks.

If your site is on an apache server you can use .htaccess / mod_rewrite which would probably be easier to keep track of what you're doing. You simply need to create a file called .htaccess and put the following code in:

Code:
RewriteEngine On RewriteRule ^([A-Za-z0-9-]+)/$ $1.html [L]


Of course you can make it more complicated if you desire, but essentially that converts any url the user types in e.g. www.something.com/friendly-url/ to find the file with the same name www.something.com/friendly-url.html

You can find out more here http://www.ilovejackdaniels.com/apac...e-cheat-sheet/
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8