1

Topic: PunRewrite 1.0, a better positioning in search engines

PunRewrite is a mod to enhance your positioning in search engines.

It rewrites URLs to include the topic title. URL like http://placelibre.ath.cx/viewtopic.php?id=2459 comes http://placelibre.ath.cx/2459-maintenant-milices.html with this hack. Other features:

    * Rewrite URLs for forums and topics
    * Transform special characters like "é" or "ç" in normal characters like "e" or "c"
    * Remove words words of less than three letters.

Demo
Download

Re: PunRewrite 1.0, a better positioning in search engines

Nice smile

Re: PunRewrite 1.0, a better positioning in search engines

Looks cool, I'll have to try it when I play around with my forums over Thanksgiving break.

Looking for a certain modification for your forum? Please take a look here before posting.

Re: PunRewrite 1.0, a better positioning in search engines

Very nice. I might actually extend the rewriting functionality currently in Subversion to include the forum and topic title like you did. I never thought about doing it this way. There might be some problems with e.g. chinese and other multibyte languages though.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

5

Re: PunRewrite 1.0, a better positioning in search engines

I like put a name in a link for all link like as "keyes" doit, so i will ask a feature here>
How about make Name (short one not the title) for every forum not just number id, it must done in Admin control panel, so when i need access a "Modifications" forum in PunBB.org i use
...punbb.org/viewforum.php?id=35
or
...punbb.org/viewforum.php?id_name=Modifications
or in rewrite mode
...punbb.org/Modifications
that make easy to access my favorate forum by its name
...parmaja.org/forums/delphi

tanks

If your people come crazy, you will not need to your mind any more.

6 (edited by keyes 2005-11-20 22:25)

Re: PunRewrite 1.0, a better positioning in search engines

Thanks.
I don't know about Chinese or Russian, works probably fine with all ISO charsets.
Just the id and ".html" is needed.
Rules for characters filtering must probably be imporved.

Please send me all URLs wich don't works fine.

Can be extended to profiles, pagination, ...

or in rewrite mode
...punbb.org/Modifications
that make easy to access my favorate forum by its name
...parmaja.org/forums/delphi

Making URL like view.php/forum/my-topic can be easly done without mod_rewrite (works evrywhere) just using the $_SERVER['PATH_INFO'] global var in PHP.
When I was using XOOPS, I have wrote a hack using this: http://www.xoops.org/modules/news/artic … ryid=1469.

Re: PunRewrite 1.0, a better positioning in search engines

merci pour ce mod keyes


pour ceux qui sont chez OVH, n'oubliez pas de modifier le .htaccess!

RewriteEngine on
RewriteRule ^f([0-9]+)(.*).html$ /forum/viewforum.php?id=$1 [L]
RewriteRule ^t([0-9]+)(.*).html$ /forum/viewtopic.php?id=$1 [L]
RewriteRule ^p([0-9]+)(.*).html$ /forum/viewtopic.php?pid=$1 [L]
RewriteRule ^(.*).rss$ /forum/extern.php?action=$1&type=rss [L]
RewriteRule ^blabla.html$ /forum/index.php [L]

ou "forum" est le nom du repertoire ou se trouve votre forum.

++

Rickard <3

Re: PunRewrite 1.0, a better positioning in search engines

nice mod.

Re: PunRewrite 1.0, a better positioning in search engines

briank wrote:

couldnt find this in search.php

#
#---------[ 33. FIND (line: 673) ]---------------------------------------------
#

                        ?><td class="tcr"><?php echo '<a href="viewtopic.php?pid='.$search_set[$i]['last_post_id'].'#p'.$search_set[$i]['last_post_id'].'">'.format_time($search_set[$i]['last_post']).'</a> '.$lang_common['by'].' '.pun_htmlspecialchars($search_set[$i]['last_poster']) ?></td><?php

try line:658

or search for

<?php echo '<a href="viewtopic.php?pid='.$search_set[$i]['last_post_id'].'#p'.$search_set[$i]['last_post_id'].'">'.format_time($search_set[$i]['last_post']).'</a> '.$lang_common['by'].' '.pun_htmlspecialchars($search_set[$i]['last_poster']) ?></td>

10

Re: PunRewrite 1.0, a better positioning in search engines

mmm i have a v 1.2.10 and dont work i cannot post and cannot enter to post to have a "?" to final.

11

Re: PunRewrite 1.0, a better positioning in search engines

Gadem wrote:

mmm i have a v 1.2.10 and dont work i cannot post and cannot enter to post to have a "?" to final.

im running this mod succesfully on 1.2.10 :x

12

Re: PunRewrite 1.0, a better positioning in search engines

Nice, 

Thanks ,

13

Re: PunRewrite 1.0, a better positioning in search engines

i bealive... i will put a others mods, MP mod, this afect?

14

Re: PunRewrite 1.0, a better positioning in search engines

Strange T-STRING errors...

searching for this:

<ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a></li><li> » <a href="viewforum.php?id=<?php echo $cur_topic['forum_id'] ?>"><?php echo pun_htmlspecialchars($cur_topic['forum_name']) ?></a></li><li> » <?php echo pun_htmlspecialchars($cur_topic['subject']) ?></li></ul>

I found that in viewtopic.php (manually updated to version 1.2.10 with each update released) what's there is expressed differently:

<ul><li><a href="index.php">'.$lang_common['Index'].'</a></li><li> » <a href="viewforum.php?id='.$cur_topic['forum_id'].'">'.pun_htmlspecialchars($cur_topic['forum_name']).'</a></li><li> » '.pun_htmlspecialchars($cur_topic['subject']).'</li></ul>

i see two instances of similar code used twice in this page, simply replacing the code present with the code for this mod results in T-STRING errors related to unexpected ';' and ',' markup.

I'm wondering why my viewtopic.php has such different code from this mod.

15

Re: PunRewrite 1.0, a better positioning in search engines

Bad HTTP_REFERER. You were referred to this page from an unauthorized source. If the problem persists please make sure that 'Base URL' is correctly set in Admin/Options and that you are visiting the forum by navigating to that URL. More information regarding the referrer check can be found in the PunBB documentation.

I get this so much as soon as I implemented this in...

Re: PunRewrite 1.0, a better positioning in search engines

keyes wrote:

Just the id and ".html" is needed.

About the id, is it necessary ? If you go down the "subject in url" road, why include it ? To reduce the SQL query ?

About the .html, it's absolutely not needed. In fact, it's best not to have it. With your example, it gives: http://placelibre.ath.cx/2459-maintenant-milices/ (with optionnal ending /).

Nicer, and more effective.

Re: PunRewrite 1.0, a better positioning in search engines

Jeremie: What happens when two topics have the same subject? Then you have to start appending numbers at the end and then you're in a world of trouble.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: PunRewrite 1.0, a better positioning in search engines

True indeed.

Re: PunRewrite 1.0, a better positioning in search engines

Bad HTTP_REFERER. You were referred to this page from an unauthorized source. If the problem persists please make sure that 'Base URL' is correctly set in Admin/Options and that you are visiting the forum by navigating to that URL. More information regarding the referrer check can be found in the PunBB documentation.

I also got these errors sometimes.  I had to change back to normal links sad

20

Re: PunRewrite 1.0, a better positioning in search engines

i have a proble, if i go to a topic to have "?" to final i cant open this tipic: give this error:

Forbidden
You don't have permission to access /rewrite/forums/t171-hola-todos?.html on this server.

Apache/1.3.31 Server at localhost Port 80

how i fix this problem?

in a Keyes Forum not have this problem, but her forums url is other and my forum url is:
Exaple

Gadem's forum URL
forums/t171-hola-todos%3F.html

Keyes Froum Url:

forums/t171-hola-todos.html

21 (edited by trf 2005-11-27 07:58)

Re: PunRewrite 1.0, a better positioning in search engines

Works great!  I have it up and running on my forums. smile

I've also modified the Google Sitemap Generator extension for use with PunRewrite so that the new rewritten URLs are displayed in the xml file.  You can download it from http://www.punres.org/desc.php?pid=149.

22

Re: PunRewrite 1.0, a better positioning in search engines

I'll don't support PunRewrite anymore.
I'm now using Sim07's PunOOgle : http://punres.org/desc.php?pid=162

Re: PunRewrite 1.0, a better positioning in search engines

I am running PunBB 1.2.11 and this mod seems not working. Any help? Or it's my fault?

I had tried to follow the instruction but the files are different.

Thanks.

Re: PunRewrite 1.0, a better positioning in search engines

Hi guys,

I can read english and I see that the developer doesn't support this mod anymore.

There is any chance to make it working?

I woul like to have this mode on my Site.


Regards.

25 (edited by Protheo 2006-08-27 15:42)

Re: PunRewrite 1.0, a better positioning in search engines

cannot enter to post to have a "?" to final.

The same happens to me...¿any help with this? Here you have an example of what happens, try to click on thread in this forum:

http://www.compradoresonline.com.ar/f19 … tivos.html

Also search doesn't work, so i have to go back to the original one.

Thanks for the help.