Your own short URLs
#11
@dmmcintyre3:

Better to use the direct PHP files and complete server URL for better 'compatibility':

rewrite ^/p([0-9]+)$ http://www.example.com/showthread.php?pid=$1#pid$1 permanent;
rewrite ^/t([0-9]+)$ http://www.example.com/showthread.php?tid=$1 permanent;
rewrite ^/f([0-9]+)$ http://www.example.com/forumdisplay.php?fid=$1 permanent;
rewrite ^/u([0-9]+)$ http://www.example.com/member.php?action=profile&uid=$1 permanent;
rewrite ^/e([0-9]+)$ http://www.example.com/calendar.php?action=event&eid=$1 permanent;
rewrite ^/c([0-9]+)$ http://www.example.com/calendar.php?calendar=$1 permanent;
Reply
#12
This is awesome! And I would use it, except I like how on bit.ly it lets you track clicks. Undecided
Reply
#13
WOW, i really want to use it with Google SEO. But how ? Could anyone show me ? Thanks a lots.
Software is like sex: it's better when it's free.
-Linus Torvalds
Reply
#14
thank you for the post
Reply
#15
Ah, already known how to use it for Google SEO, just add this in your .htaccess then Google SEO will automatically rewrite the basic URL into Google SEO URL Big Grin

rewrite ^/p([0-9]+)$ http://www.example.com/showthread.php?pid=$1#pid$1 permanent;
rewrite ^/t([0-9]+)$ http://www.example.com/showthread.php?tid=$1 permanent;
rewrite ^/f([0-9]+)$ http://www.example.com/forumdisplay.php?fid=$1 permanent;
rewrite ^/u([0-9]+)$ http://www.example.com/member.php?action=profile&uid=$1 permanent;
rewrite ^/e([0-9]+)$ http://www.example.com/calendar.php?action=event&eid=$1 permanent;
rewrite ^/c([0-9]+)$ http://www.example.com/calendar.php?calendar=$1 permanent;

Have fun, thanks querschlaeger Smile
Software is like sex: it's better when it's free.
-Linus Torvalds
Reply
#16
(2011-03-08, 02:29 PM)querschlaeger Wrote: @dmmcintyre3:

Better to use the direct PHP files and complete server URL for better 'compatibility':

rewrite ^/p([0-9]+)$ http://www.example.com/showthread.php?pid=$1#pid$1 permanent;
rewrite ^/t([0-9]+)$ http://www.example.com/showthread.php?tid=$1 permanent;
rewrite ^/f([0-9]+)$ http://www.example.com/forumdisplay.php?fid=$1 permanent;
rewrite ^/u([0-9]+)$ http://www.example.com/member.php?action=profile&uid=$1 permanent;
rewrite ^/e([0-9]+)$ http://www.example.com/calendar.php?action=event&eid=$1 permanent;
rewrite ^/c([0-9]+)$ http://www.example.com/calendar.php?calendar=$1 permanent;

That would redirect it to the non seo url version instead. I can't really use the full url because I use a include file with all the rewrite rules in it for all my forums.

[Image: signature.php]
Reply
#17
Just a brief note: the same schema can also make URLs involving "misc.php?page=" shorter. Wink
Reply
#18
(2011-03-14, 02:33 PM)linguist Wrote: Just a brief note: the same schema can also make URLs involving "misc.php?page=" shorter. Wink

I already have a rewrite rule set for that too.
[Image: signature.php]
Reply
#19
This form
http://www.example.com/showthread.php?pid=$1#pid$1
always gives me MySQL errors, also with the Backlink on quoted posts. Anyone an idea why?
Reply
#20
This URL redirects nice
[Image: sundi3yansyah@github.jpg]
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)