slash the slash or drop the slash? November 7, 2008 12:00 PM   Subscribe

MeFi URL's don't work without a trailing slash in some cases.

I've noticed that entering a thread URL by number only works when you include the trailing slash, BUT doesn't need the trailing slash when the title is included.

Example 1a: (this does work)
http://www.metafilter.com/19/

Example 1b: (this doesn't work)
http://www.metafilter.com/19

Example 2a: (this works)
http://www.metafilter.com/76317/Woah-Excellent

Example 2b: (this also works)
http://www.metafilter.com/76317/Woah-Excellent/
posted by blue_beetle to Bugs at 12:00 PM (43 comments total) 1 user marked this as a favorite

sorry about the misplaced apostrophe <hangs head in shame />
posted by blue_beetle at 12:00 PM on November 7, 2008


The trailing slash after the threadid is mandatory in canonical urls, which is why 1a, 2a, and 2b work while 1b doesn't.

Everything after that is wildcard go-crazy stuff as far as the web server is concerned, though, which is why 2b isn't a problem, and neither is this:

http://www.metafilter.com/76317/slashes-rule///slashy-slash/slasherdom\ohshitabackslashtoo\/\/\/\/dayum
posted by cortex (staff) at 12:05 PM on November 7, 2008 [2 favorites]


You can put anything after the first slash and it'll work.

http://www.metafilter.com/76317/sdfsd/sdfsdf/
http://www.metafilter.com/76317////slash/

Okay, well probably not anything.
posted by ODiV at 12:06 PM on November 7, 2008


You're going down cortex.
posted by ODiV at 12:07 PM on November 7, 2008


There's also the old-style urls, which have no title text aspect and only work without a trailing slash:

http://www.metafilter.com/mefi/19 (works!)
http://www.metafilter.com/mefi/19/ (hurls!)

But that's a deprecated format, and just redirects to the canonical style anyway.
posted by cortex (staff) at 12:07 PM on November 7, 2008


http://www.metafilter.com/76317/slashes-rule///slashy-slash/slasherdom\ohshitabackslashtoo\/\/\/\/dayum

Actually, that doesn't work, and now you have to wear the funny hat.
posted by middleclasstool at 12:08 PM on November 7, 2008 [1 favorite]


Huh. Works for me (though it turns the backslashes into forward slashes). IE, XP.
posted by cortex (staff) at 12:09 PM on November 7, 2008


Firefox do a foh-oh-foh.
posted by middleclasstool at 12:10 PM on November 7, 2008


That's true. If you're trying to assemble your own URLs, there are some issues with trailing slashes. But for the most part, people will be linking to MetaFilter from existing links gathered from this site. People generally don't have to construct their own MetaFilter URLs unless they're writing a Greasemonkey script. And any links to threads here at the site will be valid and work. We prefer the [subdomain]/[thread id]/[link stub] construction and use it wherever possible. There are a few threads here and there however that don't yet have a link stub, so there are a handful of unusual cases (like thread 19 that you mention).
posted by pb (staff) at 12:10 PM on November 7, 2008


And yeah, the backslashes be what breakin' it all up.
posted by middleclasstool at 12:10 PM on November 7, 2008


Right, blue_beetle, but there don't exist any links to metafilter.com/123 anywhere on the web. Basically there are two formats:

Old one: metafilter.com/mefi/123
New one: metafilter.com/123/Title (where title can be cut off and still work)

That's about it really. Calling it a bug that typing in an invalid URL leads to an error is a bit like asking why Slashdot gives an error when I type slasdot.org/ following by a random string of numbers or letters. The URLs in the format you say are giving errors don't exist anywhere on the site and can only be seen when typing them in, just like any sort of random typing.
posted by mathowie (staff) at 12:11 PM on November 7, 2008


Don't discriminate. Account for random typing!
posted by carsonb at 12:15 PM on November 7, 2008


According to Jakob Nielsen, accommodating line noise in urls is the most pressing accessibility issue on the web today, yes.
posted by cortex (staff) at 12:18 PM on November 7, 2008


This doesn't work for me:
http://metafilter.com/That-thread-about-the-mushrooms-you-know-the-one
posted by Plutor at 12:29 PM on November 7, 2008 [1 favorite]


Previously
posted by burnmp3s at 12:29 PM on November 7, 2008


According to Jakob Nielsen, accommodating line noise in urls is the most pressing accessibility issue on the web today, yes.

So you admit to deserving the funny hat.
posted by middleclasstool at 12:49 PM on November 7, 2008 [1 favorite]


It's not funny, it's debonair. A less humble fellow would point out how much of a catch the ladies think he is.
posted by cortex (staff) at 12:56 PM on November 7, 2008 [1 favorite]


Cortex's hat? Jaunty!
posted by eyeballkid at 1:17 PM on November 7, 2008


backslashes in urls??? YOU GO TO FAR CORTEX!
:shakes fist:

nice hat, though.
posted by boo_radley at 1:39 PM on November 7, 2008


Why do people, when reading URLs aloud, still insist on saying "forward slash"? What is it, 1994? Are people still so DOS-crazy that, upon hearing "slash," they automatically default to the oblique?
posted by Sys Rq at 1:42 PM on November 7, 2008




I thought Barack was going to fix everything?!
posted by Brandon Blatcher at 2:01 PM on November 7, 2008 [1 favorite]


I thought Barack was going to fix everything?!

Give him time. He's got a transition team working on this very issue.
posted by languagehat at 2:12 PM on November 7, 2008 [1 favorite]


Hence HTML 4.0bama Transitional.
posted by cortex (staff) at 2:16 PM on November 7, 2008 [4 favorites]


So what happened to Matt's preference for http://www.metafilter.com/mefi/12345/whatever ?
posted by desjardins at 2:23 PM on November 7, 2008


Recent Activity breaks without the slash as well, on IE at least. And IE's autocomplete doesn't remember it, so it's perpetually breaking.
posted by bonaldi at 2:24 PM on November 7, 2008


desjardins, that's a preference over an abbreviated new-style url of http://www.metafilter.com/n/, where the real canonical url is actually http://www.metafilter.com/n/official-title-text .

The argument being that:
1. there is no easy way for an app to guess the full with-text canonical url,
2. an old-style url will redirect to a full canonical url, and
3. it's preferable on the whole to have one version of the canonical url kicking around instead of several.

Hence, build an old-style url rather than a new-style-but-abbreviated url to keep the namespace dilution down. It's not the end of the world either way, but that's the reasoning for the preference at least. It's more of a concern for situations where someone is generating urls for display on google-indexable (or otherwise likely-to-be-disseminated) pages than it is for intermediary apps that are just giving someone a utility link to click during their browsing, regardless.
posted by cortex (staff) at 2:33 PM on November 7, 2008


What version of IE are you using, bonaldi? Both this:

http://www.metafilter.com/contribute/activity

and this:

http://www.metafilter.com/contribute/activity/

work fine for me in IE7. And do you get a standard 404, or is it some other error message?
posted by pb (staff) at 2:38 PM on November 7, 2008


Oh! I thought this thread would be about MetaFilter slash fiction.
posted by never used baby shoes at 2:54 PM on November 7, 2008


Dear PC User,

I never thought this would happen to me, but one I was alone in the server room, with root access...
posted by Brandon Blatcher at 3:04 PM on November 7, 2008 [3 favorites]


This seems like as good a place as any to point out that links to individual comments in MeFi Music are still broken in Safari -- see this comment.
posted by danb at 3:30 PM on November 7, 2008


Thanks danb, music comment links should be working now.
posted by pb (staff) at 4:32 PM on November 7, 2008


I nominate pb as Chief National Fixer of Stuff. You'll be a shoe-in in they new administration.
posted by Catfry at 5:55 PM on November 7, 2008


I thought Barack was going to fix everything?!

I'm totally disillusioned with the new administration already.
posted by Fuzzy Skinner at 6:19 PM on November 7, 2008


cortex's urls are disturbing trend in slash fiction.
posted by lukemeister at 6:29 PM on November 7, 2008


uh, a disturbing ...

Yours in disturbia.
posted by lukemeister at 6:30 PM on November 7, 2008


Sys Rq wrote: Why do people, when reading URLs aloud, still insist on saying "forward slash"? What is it, 1994? Are people still so DOS-crazy that, upon hearing "slash," they automatically default to the oblique?

The word you're looking for is 'stroke'. (But I refuse to say that when speaking URLs, as it would imply support for John Humphrys, who doesn't know his 'outwith' from his elbow.)
posted by jack_mo at 6:39 PM on November 7, 2008 [1 favorite]


Guns N' Roses doesn't work without Slash.
posted by Knappster at 8:02 PM on November 7, 2008


The word you're looking for is 'stroke'.

Is it not whack? We say whack.
posted by DarlingBri at 9:54 PM on November 7, 2008


Guns N' Roses doesn't work without Forward Slash.

FTFY. To avoid confusion.
posted by bjrn at 4:29 AM on November 8, 2008


Guns N' Roses doesn't work without Slash.

http://www.metafilter.com/19buckethead


yup, same problem here.
posted by Free word order! at 1:12 PM on November 8, 2008


Awesome! Thanks pb!
posted by danb at 2:32 PM on November 8, 2008


A violent slash / A sudden stroke / A whack upside the head.
A scratch comma (your eyes out) / You are very nearly dead.

An oblique dash / (Your brains are getting / Splattered into goo);
A sexy separatrix / Makes a torso out of you.
posted by Sys Rq at 4:29 PM on November 8, 2008 [2 favorites]


« Older Saturday November 8 meetup in Denver?   |   NPR askme callout Newer »

You are not logged in, either login or create an account to post comments