1 (edited by ephestione 2010-07-13 22:19)

Topic: Smart 404 redirect missing pages to search result / SEF url validation

Hello there!
Registed to ask these couple functionalities:
1) the most useful IMO, PunBB needs something like this: http://wordpress.org/extend/plugins/smart-404/
To put it simply, and to give a real-life scenario, I currently have a forum on one of my websites, which I made getting an existing PHP script and sweating blood to personalize, make seo friendly and generally pump it up to new heights. Had I known before I would've just gone with punbb straight away. Anyway, urls on that forum of mine are like "/forum-<threadid>-post-title-in-this-space. I can improvise a script to import into punbb database the posts data, won't be beautiful but I just need it working so who cares. What I am not going to do is to manually set redirection tables from old urls to new ones, so it would be great if I could just 301 redirect

/forum-([0-9]+)-(.*)

to

/forum/$2

and let such smart 404 extension do the search (the thread title would be the exact same thing so it would always get a perfect match) and the subsequent 301 redirect to

/forum/topic/XX/post-title-here

(in case you have fancy folder based seo friendliness big_smile)

2) Validate SEF url so that, if I have /forum/topic/20/how-to-get-help, and someone maliciously links to /forum/topic/20/ephestione-s-forum-stinks, the users arriving from the link get 301 redirected to /forum/topic/20/how-to-get-help
Currently, the url stays like /forum/topic/20/ephestione-s-forum-stinks which is not really cool wink Both for simple bad url, and because search engines will count the two urls as duplicate contents, with the consequent bad ranking.

EDIT: following not needed anymore, KeyDog pointed me to a perfectly working unofficial extension

2) reCAPTCHA integration. reCAPTCHA is great for a couple of reasons: you load some routines off your sever (namely the image creation and the code check), and you help digitize books. The only bad thing is that it's now owned by google tongue
I have found an unofficial guide for that, but it only appears to work on 1.2 builds of punbb, plus I'd still prefer to have an official extension for that wink

Re: Smart 404 redirect missing pages to search result / SEF url validation

ephestione wrote:

reCAPTCHA integration

You can download this recaptcha extension

3 (edited by ephestione 2010-07-13 10:30)

Re: Smart 404 redirect missing pages to search result / SEF url validation

Hello and thankyou KeyDog for pointing me to that (tested as working!) extension which just replaced the standard captcha code wink
Also very interesting is the unofficial repository linked from within your signature, too bad the gravatar extension is tested up to 1.3.2 and in fact doesn't appear to work in 1.3.4

Now, I just wish the smart 404 suggestion appeals to someone else other than me big_smile

Re: Smart 404 redirect missing pages to search result / SEF url validation

Your welcome for the pointer !

Which of the two Gravatar extensions are you using? One I see by Rich Pedley and one by GarciaT
If you can post your bug report in the thread of the specific extension the author might be able to fix...

Re: Smart 404 redirect missing pages to search result / SEF url validation

and thank you AGAIN for the second correction tongue
For some weird reason I only noticed the version by garciat and not the one by rich pedley, which instead works perfectly both for registered users and guests, and both for gravatars and for the identicon/wavatar/monsterid counterpart wink

6 (edited by ephestione 2010-08-06 09:06)

Re: Smart 404 redirect missing pages to search result / SEF url validation

I know bumping is not politically correct, and hurts little children, yet I'd like to stress the importance of more proper pretty URL management.
Here's an example:

1) http://punbb.informer.com/forums/topic/ … -requests/  (proper url)
2) http://punbb.informer.com/forums/topic/ … re-stupid/  (keyword bombing url by an "adversary")
3) http://punbb.informer.com/forums/topic/ … ure-reques  (error in copy/pasting the url)

These all point to the exact same content

Disandvantage of no. 3: search engines detect duplicate content, lowering the rating of the thread

Disadavantage of no. 2: same of no. 3, plus search engines will associate potentially "bad" keyword to your thread

Advantages of a proper redirect which points to http://punbb.informer.com/forums/topic/ … -requests/ all the requests for http://punbb.informer.com/forums/topic/ … ything>:

1) protection against previous problems
2) much easier migration form other forums: I managed to write a PHP script to move the whole content of my old semi-self-made forum script (600 posts something) into punBB, mantaining the topic number association, but unless I manually write an external script that accesses the database for each "old" request, I cannot use pretty urls; while, if a better managment was in place, I could simply have a redirect in .htaccess which 301 redirects all requests for forum-([0-9]+)-.* (current url of my forum) to forum/topic/$1 (new url I intend to use with punbb) without regards to the thread title, and punbb would do a second 301 redirect to forum/topic/$1/whatever-the-title-may-be until the searech engine links are all updated

Re: Smart 404 redirect missing pages to search result / SEF url validation

I'd be interested to hear from a developer about the mertis of this idea. Seems to make a lot of sense to plan something like this for the next release 1.3.5 - but that's just my opinion big_smile

8 (edited by ephestione 2010-08-07 11:02)

Re: Smart 404 redirect missing pages to search result / SEF url validation

every single self-made SEF url fucntion of every site I manage has this kind of check, after all SEF URL validation is always a good thing, otherwise it isn't really SEF wink
Implementing it when you already know the base code (in my case, I wrote the code of my websites, so i would know big_smile) is a no brainer; on the other side, having to learn the mechanics behind rewrite.php and all its includes, in order to devise a method to update it and mantain its basic functionality and at the same time adding your required feature, is utterly bothersome, to say the least big_smile
I'd definitely prefer having an official update addressing that issue, and for the time being I could write an external php script that intercepts the calls to /forum/topic([0-9]+)(.*)$ and checks whether $2, stripped of -p([0-9]+)$ if that's the case, matches with the url-friendly title of the topic no. $1, if yes transparently redirects to the topic url, otherwise adjusts the url and redirects to that.

Obviously, all this is IF I can find the time. Which is not certain at all. Also considering it would be a very temporary and ugly solution, and I don't like to waste time on temporary things.

Re: Smart 404 redirect missing pages to search result / SEF url validation

ephestione wrote:

on the other side, having to learn the mechanics behind rewrite.php and all its includes, in order to devise a method to update it and mantain its basic functionality and at the same time adding your required feature, is utterly bothersome, to say the least

I wonder if it isn't worth it, that you do learn it - seem like a bright person - and are motivated enough. Why don't you write Slavok / alexp and ask him for confirmation, that if you do start work on it, he will help - and more importantly - make it official update 1.3.5. It's about time there was one anyway! smile

Re: Smart 404 redirect missing pages to search result / SEF url validation

Thank you for the positive suggestion wink
I may be bright, but I am a dentist with time on his hands thanks to the approaching vacation period. I am bound to work it out somehow sooner or later, even if only after the launch of the migrated-to-punbb forum. I won't miss to publish my solution in here to be used maybe a starting point for next release

11

Re: Smart 404 redirect missing pages to search result / SEF url validation

Just was reminded a minute ago about the "page 1" that's always on pages it's not needed...

would you see this fix as the best for SEO
http://punbb.informer.com/forums/topic/ … fications/

or are there more SEO friendly ways?

ephestione wrote:

. I won't miss to publish my solution in here to be used maybe a starting point for next release

ok cool

Re: Smart 404 redirect missing pages to search result / SEF url validation

not much needed probably, maybe helping a little. Googlebot checks the first 70chars of a webpage title, so as long as the topic title stasrts at the beginning of the <title> tag, the keyword weight shouldn't be changed even if there are other things after.
Anyway, I bumped into that request already, didn't participate it as it wasn't a priority for me, anyway such a tiny change is surely something to be considered in next release, maybe with a checkbox in settings, if not else, to make the title cleaner; anyway, IMO that should be a no-brainer to modify for punbb developers who already know the code big_smile

And regarding my fix, I'm not saying I will surely work on it, nor that it will be very soon, what's sure is that SEF url validation IS a priority for me so I will be at least willing to correct that wink