Thread:Project:Support desk/Custom URL rewriting based on Namespace/reply

With rewrites you can potentially do anything (including this), but I'm not sure whether you should as it may make other parts of MediaWiki seem less logical or even confusing or breaking.

Using mod_rewrite, it will give you the ability to use the custom urls incoming (you can do that right now by matching something like  and routing it to  ). However, it would only allow you to form these urls by hand (and they'll work), but outbound links generated by the software (e.g. when clicking a username) it would still use. You'd need a hook in the Linker to also customize the links outputted by the software.

Keep in mind that then still, one would still still use when editing the source code of a page (as " /user/my_username " would be a very different page). Same for the page title displayed on top of the page. It would only affect urls.

It will potentially break or inconvenience interwiki and auto-generated urls that rely on the pattern being fixed with a single variable:. There are many places where this assumption is made.

So I'd recommend reconsidering whether this is useful in a MediaWiki context, before trying to implement it because there's a lot of drawbacks and various places all over where it won't have that url pattern. Meaning you'll end up with a situation where the user is faced with 2 different urls for the same content where the two alternate on grounds that seem arbitrary to an average user.