Customizable mod-rewrite url ending

3 views
Skip to first unread message

Alexander Obuhovich

unread,
Dec 15, 2009, 7:46:37 AM12/15/09
to In-Portal Development
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.

--
Best Regards,

http://www.in-portal.org
http://www.alex-time.com

Dmitry A.

unread,
Dec 16, 2009, 2:29:14 PM12/16/09
to In-Portal Development
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!

DA.

Alexander Obuhovich

unread,
Dec 16, 2009, 2:38:12 PM12/16/09
to in-por...@googlegroups.com
I didn't understand idea about replacement specifying.

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

--

You received this message because you are subscribed to the Google Groups "In-Portal Development" group.
To post to this group, send email to in-por...@googlegroups.com.
To unsubscribe from this group, send email to in-portal-de...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/in-portal-dev?hl=en.


Dmitry A.

unread,
Dec 16, 2009, 2:41:51 PM12/16/09
to In-Portal Development
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.


DA.
> > in-portal-de...@googlegroups.com<in-portal-dev%2Bunsubscribe@goog­legroups.com>
> > .

Alexander Obuhovich

unread,
Dec 16, 2009, 2:47:35 PM12/16/09
to in-por...@googlegroups.com
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.


To unsubscribe from this group, send email to in-portal-de...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/in-portal-dev?hl=en.


Dmitry A.

unread,
Dec 16, 2009, 3:04:15 PM12/16/09
to In-Portal Development
Yes, agreed - somehow I missed your initial point in the first place.


Anyway here is the task:

454: Customizable URL Endings for Mod-rewrite

http://tracker.in-portal.org/view.php?id=454


Cheers!

DA.



On Dec 16, 1:47 pm, Alexander Obuhovich <aik.b...@gmail.com> wrote:
> 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.
Reply all
Reply to author
Forward
0 new messages