When I link to one of these
auriplaneJoined: Sep 06 2008 |
When I link to one of these pages: http://www.gametabs.net/tabber/ronito They redirect to this: http://www.gametabs.net/user/84/tabs Wouldn't it be better if the username were in the URL instead of the number?
----------
|
auriplane said Wouldn't it be
archardJoined: Jan 11 2007 |
auriplane said
Yeah that's a good question. This will be a wall of text, which is why I originally said I wasn't going to elaborate. Drupal has a less than ideal way of handling paths. The easiest way to create 'clean' URLs is to make aliases that map to their internal path ('user/[uid]'). That's what I used to do, but then I decided I wanted to add 'Tabs' and 'Recordings' tabs to user profiles. In Drupal the URL of a 'tabbed' page is always based off the internal path of the parent page. So even though I had aliases for the user profile pages, the Recordings and Tabs pages were always based on the internal path. I hated that inconsistency, but I really wanted to put tabs on pages, and not just user profile pages. So last summer I came up with a way to trick Drupal into thinking that the path 'user/[clean-user-name]' was the internal path, and that worked well for awhile. But then edge cases started to show up. For example, what do you do if the user has a dash in their name, since the dash is already reserved for spaces? Or what if they have a pound sign? Since you're dealing with a true internal path, you can't just strip out unwanted characters. I came up with a few ticky-tack solutions to deal with the edge cases, but then I realized that the problem only gets worse when extending this to category paths, which are far more liberal in their character usage. At least with user paths you can restrict the characters the user is able to pick, but not so in game, composer, etc paths. And I'd really like to add tabs to those pages in the future as well (think composer profiles). All this combined with the fact that users were reporting page not founds in their profiles, which I thought was related to my modifications but it turns out that wasn't the case, I decided to just say screw it and go back to normal, unaliased, unmodified URLs. Yeah, it's not as pretty, but it simplifies the hell out of things. One other option would be to alias the tabbed paths as well, but I would have to figure out how to do that and write a script, and I'm just not sure it's worth the complications. tl;dr - unaliased URLs are more flexible
----------
DANG |
archard
Joined: Jan 11 2007
I just made a bunch of changes to the URL structure of the site. I won't get into the reasons for this, but basically all game, composer, series, user, style and instrument URLs have been altered. I've set up redirects for all URLs though, so if you have one bookmarked or whatever, you'll be redirected to the new URL.
I wanted to make an announcement in case I broke something, which usually happens, you can post it here.