1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Allow URLs to be modified, being able to remove forums, threads, etc.

Discussion in 'Closed Suggestions' started by Walter, Aug 20, 2010.

  1. Walter

    Walter Well-Known Member

    The current URL structure is:

    thread: /community/threads/guide-to-suggestions.2285/
    page: /community/pages/example-page/

    The URL is quite long. Would it be possible to shorten them?

    Alternative 1, remove only "threads":
    thread: /community/guide-to-suggestions.2285/
    page: /community/pages/example-page/

    Alternative 2, remove "threads" and "pages":
    thread: /community/guide-to-suggestions.2285/
    page: /community/example-page/ (or page: /community/example-page.nnn/)

    Of course it would be better if the pages didn't have a number, you could code it this way: URLs with a number are thread, URLs without a number are treated as pages?

    If you want this suggestion, don't forget to give my post a "like"
    wtgw, ked38 and Photon like this.
  2. KURTZ

    KURTZ Well-Known Member

  3. Shadab

    Shadab Well-Known Member

  4. Walter

    Walter Well-Known Member

    Sorry Kurtz and Shadab, I think my proposal is completely different.

    If I give you three options
    1. /community/guide-to-suggestions.2285/
    2. /community/threads/guide-to-suggestions.2285/
    3. community/index.php?threads/2333/ or anything like this
    at least I know which I would prefer. Number 1 is by far the best readable and shortest variant. Number 3 is short but ugly.
  5. Markos

    Markos Well-Known Member

    The first is seo-better.
  6. Mike

    Mike XenForo Developer Staff Member

    The prefixes (threads, pages) are there to remove ambiguity. Otherwise, it's not possible to resolve a URL definitively. The public side currently has 30 different prefixes, and the admin side is pushing 50.
  7. Walter

    Walter Well-Known Member

    I see... Thanks.
  8. James

    James Well-Known Member

    The question is, are we able to remove the threads and pages prefix?
  9. Enigma

    Enigma Well-Known Member

    If you remove the prefix, how would you know if the ID refers to a thread or a page (or one of dozens of other things)?

    It would be nice if the prefixes (threads, pages, posts, members, etc) were customisable, for if we wanted to have them in another language, or if we wanted to shorten them to single-letter equivalents or something.
  10. James

    James Well-Known Member

    Good point :p
  11. cedivad

    cedivad Active Member


    t stands for topic. you can have up to 24 (or 48 if you want to use CAPS) different content types.
  12. island

    island Active Member

    I asked a little bit about this here http://xenforo.com/community/threads/remove-forums-from-url-of-forums.5433/ but didn't get a reply yet so I'm not sure if it's possible with an easy tweak or requires a larger new feature.

    I'm used to using vbseo with vbulletin where I can customize the url structure. I don't need something that elaborate, but I'd like to see a basic ability to customize the form of the SEO URLs.

    First for example, my domain name ends in forums.com so it looks odd to me to have each forum as myforums.com/forums/suggestions for example -- I would love to be able to have simply myforums.com/suggestions (I don't mind entering each forum name in the current option blank (and have already done this so it doesn't have the number) which means it's mapped already I believe, so can the /forums/ be eliminated for each forum name to make it one level less deep?

    Second, currently the structure for threads is myforums.com/threads/threadname - here my personal preference is to have myforums.com/the-forum-it's-in/threadname - in my case I have a number of manufacturer forums so it's handy to know from the URL at a glance which manufacturer is being discussed, and good for seo too.
    Markos, nrep, Alexannix and 2 others like this.
  13. Reeve of Shinra

    Reeve of Shinra Well-Known Member

    For example:

    I have the xenforo files in the site.com/forum folder and having site.com/forum/forums/name-of-forum.2 looks pretty stupid.

    Sumo, Lost, Brett Peters and 3 others like this.
  14. dieketzer

    dieketzer Well-Known Member

  15. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  16. dieketzer

    dieketzer Well-Known Member

    aahhh. i see now.
  17. Brogan

    Brogan XenForo Moderator Staff Member

    I've mentioned this before on other threads related to this subject, but it's to do with the content type.

    So /forums for forums, obviously, /threads for threads, /members for members, etc.
  18. Ash N

    Ash N Member

    A simple mod_rewrite should do the trick...shouldn't it?
  19. SneakyDave

    SneakyDave Well-Known Member

    Or change the name of your installation directory?
    Dean likes this.
  20. Luke F

    Luke F Well-Known Member

    Although you could theoretically do a rewrite relying on the fact that your forum URLs have the ID at the end, you'd have to hack the route system a fair bit. Honestly you'd be better off either leaving it or changing the 'forums' route to something else (which is still easier said than done).

Share This Page