Jump to content
Matt

IP.Board 3: Friendly URLs at last!

Possibly the most often requested feature we've had since the very first version of IP.Board is 'friendly URLs'.

Although this sounds like you'd expect your URLs to greet you with a self-empowerment phrase first thing in the morning, it really relates to making the board generated URLs a little more attractive to both humans and search engines.

I am being very careful to avoid the phrase "Search Engine Optimization" in this opening few paragraphs despite it being used often in the request for friendly URLs. What we've added will definitely help with SEO but it's not a complete solution and neither is it intended to be.

So, what do you have?
In a nutshell: friendly URLs! The process to create and manage them is far more interesting than the end result, but more on that in a moment. Lets first look at some examples of the new URLs.

Here's a few sample URLs from IPB 2.3.x:

To show a forum (My Test Forum):
www.board.com/forums/index.php?showforum=10

To show a topic (My Test Topic):
www.board.com/forums/index.php?showtopic=99

To show a user (Matt Mecham):
www.board.com/forums/index.php?showuser=30


There's nothing wrong with those URLs. They are short and concise and they spider very well, but we can do a little better to make them more attractive.

If you are on a Windows webserver, you can use the 'query' string method which presents URLs like this:

www.board.com/forums/index.php?/forum/10/my-test-forum
www.board.com/forums/index.php?/topic/99/my-test-topic
www.board.com/forums/index.php?/user/30/matt-mecham


If you are on an apache based web server you can make use of the 'path_info' method:

www.board.com/forums/index.php/forum/10/my-test-forum
www.board.com/forums/index.php/topic/99/my-test-topic
www.board.com/forums/index.php/user/30/matt-mecham


Even better, if you can manage your own .htaccess files, you can make use of the mod_rewrite functionality. For convenience, the mod_rewrite code is generated for you. The end result looks like this:

www.board.com/forums/forum/10/my-test-forum
www.board.com/forums/topic/99/my-test-topic
www.board.com/forums/user/30/matt-mecham


What would happen if you used accented characters like this: M


×
×
  • Create New...