-
1. Re: remove .html extension all pages
MurraySummers Jun 19, 2013 3:58 PM (in response to William Noel)What? You want to name your files without an extension?
-
2. Re: remove .html extension all pages
Nancy O. Jun 19, 2013 3:58 PM (in response to William Noel)Why do you think you need this?
A typical site will look like this:
yoursite.com/about.html
yoursite.com/contact.html
yoursite.com/services.html
To change links to this:
yoursite.com/about/
yoursite.com/contact/
yoursite.com/services/
You must create separate folders and put an index.html file inside each one.
yoursite.com/about/index.html
yoursite.com/contact/index.html
yoursite.com/services/index.html
IMO, this is a terrible way to organize a site. But your mileage may vary.
Nancy O.
-
3. Re: remove .html extension all pages
johngordon12 Jun 19, 2013 3:58 PM (in response to William Noel)You can save pages in a folder each, always called index.html
So instead of:
www.mysite.com/mypage.html
Have:
www.mysite.com/mypage/index.html
-
4. Re: remove .html extension all pages
William Noel Jun 19, 2013 4:01 PM (in response to Nancy O.)A picky client request
thank for your thought
-
5. Re: remove .html extension all pages
MurraySummers Jun 19, 2013 4:01 PM (in response to johngordon12)And when you link, always just link to the folder name to get the default page loaded, e.g.,
<a href="/mypage">This will link to index.html in the mypage folder</a>
HOWEVER, if you have many files in your site, trying to do this for every page will quickly become gruesomely awkward.
-
6. Re: remove .html extension all pages
johngordon12 Jun 19, 2013 4:02 PM (in response to Nancy O.)I tend to do it a lot I must admit, which clients tend to prefer, although its less than useful when I try to open a recent file.
Is here a more involved way of doing it that larger, well known sites tend to use, or is this method pretty much it?
-
7. Re: remove .html extension all pages
William Noel Jun 19, 2013 4:02 PM (in response to johngordon12)what should I call the folder?
-
8. Re: remove .html extension all pages
MurraySummers Jun 19, 2013 4:03 PM (in response to William Noel)Call it whatever you want. Doesn't matter as long as you put a default filename file IN the folder, and link to it correctly.
-
9. Re: remove .html extension all pages
William Noel Jun 19, 2013 4:04 PM (in response to MurraySummers)Just for one page.
page is gocloud.html
-
10. Re: remove .html extension all pages
William Noel Jun 19, 2013 4:05 PM (in response to MurraySummers)great thanks for the help!!
-
11. Re: remove .html extension all pages
MurraySummers Jun 19, 2013 4:20 PM (in response to William Noel)So make a folder called 'gocloud' and rename this gocloud.html file as index.html, and put it into the gocloud folder. Then
<a href="gocloud">This will link to the index.html file in the gocloud folder (assuming that the file containing the link is in a folder that also contains the gocloud folder).</a>
-
12. Re: remove .html extension all pages
matthew stuart Jun 19, 2013 5:06 PM (in response to William Noel)I think you might be looking to do a URL rewrite in the sites .htaccess file... this would eradicate the need for lots of folders.
I would give advice on this, but I have never managed to get it to work even though I understand the pricipals of it.
Google it and also read this tut as apparently, it's a good one:
http://coding.smashingmagazine.com/2011/11/02/introduction-to-url-rewriting/
AND, when you get it working, let me have the code... I tried for days and was bought to points of rage and frustration that I didn't think existed in me!
-
13. Re: remove .html extension all pages
William Noel Jun 19, 2013 5:13 PM (in response to matthew stuart)I'll put up with that frustation another day - since client only wonted one page to do that I used the above suggeston using a directory.
Thank you for your suggestion - I bookmarked that for the next time if a client asked for all pages to do that.
-
14. Re: remove .html extension all pages
Nancy O. Jun 19, 2013 5:13 PM (in response to matthew stuart)Contact your host. It could be you're on shared hosting and your web host doesn't permit URL re-writing. Or, it might be something they could do for you at a higher level than you have access to.
Nancy O.
-
15. Re: remove .html extension all pages
William Noel Jun 19, 2013 5:15 PM (in response to Nancy O.)Thank You Nancy O
I got it to work



