2011-01-03, 04:11 PM
(This post was last modified: 2011-03-08, 02:30 PM by querschlaeger.)
Hi!
If you are using Apache you can create your own short URLs for MyBB (nginx users look here: http://community.mybb.com/thread-85532-p...#pid655723). Just add the following line to your MyBB .htaccess file:
It's a very simple redirection but useful on Twitter or Facebook. Just use p(ost), t(hread) or f(orum) and the ID you want to redirect.
Live demo:
http://phurl.de/p7832 -> redirects to a post
http://phurl.de/t1294 -> redirects to a thread
http://phurl.de/f31 -> redirects to a forum
Of course, this also works with user URLs, event URLs and calender URLs:
Please note the backslash before ampersands.
If you are using Apache you can create your own short URLs for MyBB (nginx users look here: http://community.mybb.com/thread-85532-p...#pid655723). Just add the following line to your MyBB .htaccess file:
RedirectMatch permanent ^/p([0-9]+)$ http://www.example.com/showthread.php?pid=$1#pid$1
RedirectMatch permanent ^/t([0-9]+)$ http://www.example.com/showthread.php?tid=$1
RedirectMatch permanent ^/f([0-9]+)$ http://www.example.com/forumdisplay.php?fid=$1
It's a very simple redirection but useful on Twitter or Facebook. Just use p(ost), t(hread) or f(orum) and the ID you want to redirect.
Live demo:
http://phurl.de/p7832 -> redirects to a post
http://phurl.de/t1294 -> redirects to a thread
http://phurl.de/f31 -> redirects to a forum
Of course, this also works with user URLs, event URLs and calender URLs:
RedirectMatch permanent ^/u([0-9]+)$ http://www.example.com/member.php?action=profile\&uid=$1
RedirectMatch permanent ^/e([0-9]+)$ http://www.example.com/calendar.php?action=event\&eid=$1
RedirectMatch permanent ^/c([0-9]+)$ http://www.example.com/calendar.php?calendar=$1
Please note the backslash before ampersands.