Aron

Clean URL's with no file extensions

Vote 0 Votes

Hi there,

I have just began building with MovableType after some terrible experiences with some other systems - so far I'm loving it!

I'm just wondering if there is any way to have some cleaner blog entry and page urls - without having a file extension at the end?

I understand that the actual files need extensions as they are static - however, is there a way to map url's to them and change how mt behaves to link to the clean URL as opposed to the page with the extension?

Thanks for your help

Reported on Movable Type 5

5 Replies

| Add a Reply
  • Hi Aron,

    There is nothing clean on having the generated files without extension. If you remove the extension, you will have to configure your server to interpret as html all the pages without any extension.

    Alternatively you could remove the extension and switch from static publishing to dynamic publishing, but in that case you will lose a key feature of movable type.

    So what I would advice is to keep the extension as .html. If you need to, you could even run PHP coding inside your .html files (setting the server to interpret them as .php).

    Using the .html extension could discourage attackers, or at least won't give them any clue about the technology you're using ;)

    Kind Regards,
    Mihai Bocsaru

    ----------------------------------
    Daily Movable Type Consultant

    Web Development
    Movable Type Consulting
    Six Apart Partner

    http://www.pro-it-service.com/
    ----------------------------------

    Movable Type Demo
    http://www.movabletypedemo.org/

  • Thank you for your help Mihai!

    I don't really want to use dynamic publishing as I'd hate to loose one of the main reasons I moved to MT.

    I'll take your advice on board and will consider the best solution for my sites!

  • You're welcome, Aron!

  • You can have cruft-free URLs with MT, it's mainly a matter of configuring your web server to serve those as HTML files by default (it depends on which web server you're using, not on MT).

    This said, it's pure geek perfectionism really, nobody *needs* cruft-free URLs and most people will recognize that a URL ending with .html is most likely a web page (usually what they're looking for). Also, I remember Matt Cutts from Google advising against using extension-less URLs for pages, as their search engine makes assumptions based on the extension.

    Bottom line: risks are greater than the hypothetical benefits (if there are any benefits).

  • There are definitely no benefits Francois, so I would encourage the user to simply use the .html extension :)

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

code.sixapart.com

141 498

Last Topic: Action Stream for LinkedIn by michael webster on Jan 10, 2013

254 907

Last Topic: Auditors in India by dimpi on May 3, 2013

1873 6643

Last Topic: Main Index Template by Richard on May 7, 2013

89 311

Last Topic: Seeking explanation of files and folders by CosmicKnight on Feb 23, 2013

1520 5507

Last Topic: Is there a way to edit the head element on a post-by-post basis? by jmcg8888 on May 7, 2013

743 3152

Last Topic: Installation Problem by Alex L on Apr 2, 2013

90 334

Last Topic: HELP! I need to 301 over 100 urls on my site via htaccess by justin on Feb 22, 2013

193 801

Last Topic: Deleting Revision History by Will Haynes on Mar 16, 2013

28 97

Last Topic: Movable Price by joe22 on Jan 10, 2013

51 222

Last Topic: Phone App by Duane Langshaw on Apr 3, 2013

65 249

Last Topic: Expanding new rich text editor and implementing table function by Takeshi Nick Osanai on Jul 30, 2012