Child pages
  • Customizable mod-rewrite url ending
Skip to end of metadata
Go to start of metadata

Imported From:

Currently all mod-rewrite urls are ended with ".html". This is not quite customizable. I propose to create a configuration variable e.g. RewriteUrlEnding of dropdown type with such values: "" (empty), "/", ".html". To be more custom user could specify url ending for each url individually using "url_ending" parameter of "m_Link" tag (e.g. <inp2:m_Link template="path/to/template" url_ending="/"/>).

During parsing all possible rewrite url ending will be stripped from the end of url before passing it to registered rewrite listeners. In case if developer have specified it's own url ending (via "url_ending" parameter), then of course it won't be stripped properly.

Related Tasks

INP-379 - Getting issue details... STATUS


  1. Hi Alex,

    This sounds like VERY cool and useful feature and I think my proposal
    will make it even more useful to all In-Portal users.

    What you say if we have ENDING URL option in Admin Config setting -
    something similar to what we've done with Replacement symbol?

    The way I am envisioning this:

    1. Default URL Ending is config variable (drop-down options: .html
    or / for now)
    2. Ability to force URL ending for HREF, example <inp2:m_Link
    template="path/to/template" url_ending="/"/> tag.

    What you think?

    Cheers and talk soon!


  2. I didn't understand idea about replacement specifying.

    About other part is just the same as in my initial proposal.

  3. The idea is simple - let Admin choose the default URL Ending (.html
    or /)

    Let me know if you need more detailed explanation - I'll be happy to
    provide samples.


  4. That what I've ment:

       - limited url ending selection for default url ending in admin;
       - ability to define custom url ending for each url individually.

    As I've understand you've propose exactly the same I did, but limited url
    ending selection is different. My was ".html", "/", "", your doesn't include
    empty ending, which I think is pretty useful in most cases.

  5. Yes, agreed - somehow I missed your initial point in the first place.

    Anyway here is the task:

    454: Customizable URL Endings for Mod-rewrite

    INP-379 - Getting issue details... STATUS