I noticed that the link to an individual question is of the form [base url]/question/[question id].

On a Stack Exchange site the equivalent is of the form [base url]/questions/[question id] (note the plural).

If I were to migrate my site to OSQA, how would this mismatch be resolved? Can I simply change the url pattern to match or would the data be cleaned up on import?

asked 19 Apr '10, 07:11

Rich%20Seller's gravatar image

Rich Seller
1.8k154047
accept rate: 23%

closed 07 Jun '10, 06:34

Oscar's gravatar image

Oscar ♦
2.1k376169

The question has been closed for the following reason "The question is answered, right answer was accepted" by Oscar 07 Jun '10, 06:34


Well, we have invited the StackExchange guys to change their URLs to the way we do it, but nobody has taken us up on it yet! :)

On a more serious note, we probably should just go ahead and make that change in OSQA's URL pattern. I think the plural makes more sense than the singular.

link

answered 19 Apr '10, 07:15

rickross's gravatar image

rickross ♦♦
12.5k2914972
accept rate: 46%

2

I agree plurals make more sense, particularly from a REST perspective

(19 Apr '10, 07:17) Rich Seller

awesome news!

(19 Apr '10, 23:09) debug

Yep. For migration of an existing StackExchange site, it's critical to have the same URLs otherwise you end up breaking bookmarks, links in blogs, search engine results, etc.

(20 Apr '10, 23:38) Justin Grant

Are there any updates on this?

(07 May '10, 08:39) Randell

When we fell that the importer is good enough for production use, we'll also provide a module to map SX urls, but I don't think that will be the standard OSQA way, but rather an optional mod.

(07 May '10, 08:43) Hernani Cerq... ♦♦

As a workaround, I've added an entry to forum/urls.py to redirect from /questions/... to /question/.... If and when questions becomes the default, this can be reversed to avoid breaking any links.

At the end of the urlpatterns += patterns block, I added this:

url(r'^%s(?P<id>\\d+)/(?P<slug>[\\w-]*)$' % _('questions/'), 'django.views.generic.simple.redirect_to', {'url': '/question/%(id)s/'}),

There may well be a better way, but I'm new to all this.

link

answered 18 May '10, 08:49

Rich%20Seller's gravatar image

Rich Seller
1.8k154047
accept rate: 23%

Now question URLs are the same as StackExchange, so I am closing this question.

link

answered 07 Jun '10, 06:33

Oscar's gravatar image

Oscar ♦
2.1k376169
accept rate: 27%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×144
×38
×37
×15

Asked: 19 Apr '10, 07:11

Seen: 819 times

Last updated: 07 Jun '10, 06:34

powered by OSQA