default userpic

Archive File Path without file extension?

Vote 0 Votes

I searched for hours and tried different solutions before to post this message. I’m trying to have all my permalinks to entries (as well as archive pages) without an extension in the end. Something like: http://mysite.com/blog/2008/11/19/new-design-launched-using-movable-type I have the following Archive Mapping for my Entry Archives: blog/%y/%m/%d/%-F

The thing is that when I access that link from my browser, It displays the content of the HTML page and not the page itself. So, I added an .htaccess file at the root of my blog and server with the following content: DefaultType text/html DirectoryIndex index index.html

Even with this .htaccess file, it doesn’t change anything and still displays the HTML content of the entries and not the entry itself (rendered from HTML by my browser).

Have any ideas why? Can somebody help me?

Thank you!

Reported on Movable Type 4.2

5 Replies

| Add a Reply
  • I've struggled with this, too, and tried a variety of remedies that were less than ideal.

    The easiest thing to do is to set your archive path to yyyy/mm/entry-basename/index.php (one of the default options; you could also do .html). The "index.*" doesn't actually show up with the permalinks.

    Personally, I also found it helpful to create another archive map for my old permalink structure (which was yyyy/mm/entry_basename.php) with redirect code to the new page.

    All this prevents you having to mess with your .htaccess file.

  • So the easiest thing to do is to not do it? Just no choice than having the URL with a .html extension? :(

    Thanks!

    • That's not what he/she said. Go to the Entry listing archive template, and change it so that it generates your entry listings according to the format yyyy/mm/entry-basename/index.html which is one of the standard options in the archive mapping.

  • I wasn't clear on this point.

    The permalink will be this:

    http://www.example.com/2008/11/dummy-slug/

    The actual file structure will be

    http://www.example.com/2008/11/dummy-slug/index.html

    But readers will never see the "index.html" part.

    So it's not technically serving extension-less files, but it acts the same.

    Is that clearer?

  • Ok, I see. It seems to work fine.
    Thank you very much!

Add a Reply

Forum Groups

513 1681

Last Topic: Google Analytics by Argentina Elections on May 27, 2009

202 880

Last Topic: Welcome to Movable Type by solle on May 27, 2009

49 204

Last Topic: Odd problem with searches - need help by Phill M on May 24, 2009

11 42

Last Topic: Community Solution -- but where? by webmoney on Mar 16, 2009

25 99

Last Topic: Search enhancement? by Rob on Apr 14, 2009

10 21

Last Topic: Comment Box Missing by rushskeith on Jan 9, 2009

90 318

Last Topic: Getting to the settings on Post Office by Rob G on Apr 2, 2009

code.sixapart.com

104 373

Last Topic: Login/Registration issue by Gaurav Sharma on May 26, 2009

90 307

Last Topic: HTML Printer-Friendly page shrinks by Mikki on May 19, 2009