GYM sitemap and rss compatibility with Handyman's SEO MOD

The GYM Sitemaps & RSS module for phpBB. Sitemaps and RSS feeds for Google Yahoo! and MSN Live, support, add ons etc ...

Moderator: Moderators

GYM sitemap and rss compatibility with Handyman's SEO MOD

Postby c4gamerz » Wed Nov 26, 2008 2:22 pm

hi,

I have installed this mod and is working perfectly but there is just one problem, the url looks like viewtopic.php like that but it shud be in html as i have installed handyman's seo mod. So what shud i do to make it compatible?

http://www.phpbb.com/community/viewtopi ... 9&t=691165

thx
c4gamerz
 
Posts: 43
Joined: Wed Nov 26, 2008 11:18 am

Advertisement

Postby SeO » Wed Nov 26, 2008 2:32 pm

Only the phpBB SEO mod rewrite are auto detected, but it's usually easy to obtain the url you want with the mod.

Have you tried to set URL rewriting type to simple or advanced ?
From there, only few edits in gym_sitemaps/includes/phpbb_seo_class_light.php could do a good job depending on the URL you have on your forum.
Settings are pretty easy :
Code: Select all
      // Delimiters : used as separators in the .htaccess RegEx
      // can be edited, requires .htaccess update.
      $this->seo_delim = array( 'forum' => '-f', 'topic' => '-t', 'user' => '-u', 'usermsg' => '-m', 'group' => '-g', 'start' => '-');
      // Default : Used as URL when format_url would return nothing or with simple URLs
      // can be edited, requires .htaccess update.
      $this->seo_static = array( 'forum' => 'forum', 'topic' => 'topic', 'post' => 'post', 'user' => 'member', 'group' => 'group', 'index' => '', 'global_announce' => 'announces', 'leaders' => 'the-team', 'usermsg' => 'messages', 'pagination' => 'page', 'gz_ext' => '.gz' );
      // URL suffixes, for the phpBB URLs
      // can be edited, requires .htaccess update.
      $this->seo_ext = array( 'forum' => '.html', 'topic' => '.html', 'post' => '.html', 'user' => '.html', 'usermsg' => '.html', 'group' => '.html',  'index' => '', 'global_announce' => '/', 'leaders' => '.html', 'pagination' => '.html', 'gz_ext' => '');


Give more details about your rewritten forum urls (topic, forum, and pagination) if you want more help.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby c4gamerz » Wed Nov 26, 2008 2:53 pm

yeah i tried mixed option but it wasnt working propery like it gives url like utf-8.html something like that

here is my .htaccess

Code: Select all
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>

<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
ErrorDocument 400 /forum/error.php?mode=400
ErrorDocument 401 /forum/error.php?mode=401
ErrorDocument 403 /forum/error.php?mode=403
ErrorDocument 404 /forum/error.php?mode=404
ErrorDocument 500 /forum/error.php?mode=500

<Files .htaccess>
Order Allow,Deny
Deny from All
</Files>

RewriteEngine on

Rewriterule ^(.+)-f([0-9]*).html-(.+)$            ./viewforum.php?f=$2&$3
Rewriterule ^(.+)-(t|p)([0-9]*).html-(.+)$         ./viewtopic.php?$2=$3&$4
Rewriterule ^(.+)-f([0-9]*)s([0-9]*).html-(.+)$      ./viewforum.php?f=$2&start=$3&$4
Rewriterule ^(.+)-(t|p)([0-9]*)s([0-9]*).html-(.+)$   ./viewtopic.php?$2=$3&start=$4&$5

Rewriterule ^(.+)-f([0-9]*).html$               ./viewforum.php?f=$2&$3
Rewriterule ^(.+)-(t|p)([0-9]*).html$            ./viewtopic.php?$2=$3&$4
Rewriterule ^(.+)-f([0-9]*)s([0-9]*).html$         ./viewforum.php?f=$2&start=$3&$4
Rewriterule ^(.+)-(t|p)([0-9]*)s([0-9]*).html$      ./viewtopic.php?$2=$3&start=$4&$5



i tried adding following rules

Code: Select all
#####################################################
# GYM Sitemaps & RSS
# Global channels
RewriteRule ^rss(/(news)+)?(/(digest)+)?(/(short|long)+)?/?$ gymrss.php?channels&$2&$4&$6 [QSA,L,NC]
# HTML Global news & map
RewriteRule ^(news|maps)/?(page([0-9]+)\.html)?$ map.php?$1&start=$3 [QSA,L,NC]
# END GYM Sitemaps & RSS
#####################################################

#####################################################
# GYM Sitemaps & RSS
# MTML Module additional modes
RewriteRule ^(news|maps)/([a-z0-9_-]+)(/([a-z0-9_-]+))?/?(page([0-9]+)\.html)?$ map.php?$2=$4&$1&start=$6 [QSA,L,NC]
# Main feeds & channels
RewriteRule ^rss(/(news)+)?(/(digest)+)?(/(short|long)+)?(/([a-z0-9_-]+))?/([a-z0-9_]+)\.xml(\.gz)?$ gymrss.php?$9=$8&$2&$4&$6&gzip=$10 [QSA,L,NC]
# Module feeds
RewriteRule ^[a-z0-9_-]*-[a-z]+([0-9]+)(/(news)+)?(/(digest)+)?(/(short|long)+)?/([a-z0-9_]+)\.xml(\.gz)?$ gymrss.php?$8=$1&$3&$5&$7&gzip=$9 [QSA,L,NC]
# Module feeds without ids
RewriteRule ^([a-z0-9_-]+)(/(news)+)?(/(digest)+)?(/(short|long)+)?/([a-z0-9_]+)\.xml(\.gz)?$ gymrss.php?nametoid=$1&$3&$5&$7&modulename=$8&gzip=$9 [QSA,L,NC]
# Google SitemapIndex
RewriteRule ^sitemapindex\.xml(\.gz)?$ ./sitemap.php?gzip=$1 [QSA,L,NC]
# Module cat sitemaps
RewriteRule ^[a-z0-9_-]+-([a-z]+)([0-9]+)\.xml(\.gz)?$ sitemap.php?module_sep=$1&module_sub=$2&gzip=$3 [QSA,L,NC]
# Module sitemaps
RewriteRule ^([a-z0-9_]+)-([a-z0-9_-]+)\.xml(\.gz)?$ sitemap.php?$1=$2&gzip=$3 [QSA,L,NC]
# END GYM Sitemaps & RSS
#####################################################


but it gives me no url found error in sitemap.xml.gz and utf8-f879.html in forum and topic urls.

here is my functions_seo.php file

[mod]Too much code![/mod]

here is my site i have uninstalled gym sitemap mod for now
http://islamicteachings.org/forum/

Thank you very much for your help :D

edit: functions_seo.php updated
c4gamerz
 
Posts: 43
Joined: Wed Nov 26, 2008 11:18 am

Postby SeO » Wed Nov 26, 2008 3:26 pm

Setting url rewritng type to advanced and replacing :
Code: Select all
'start' => '-'

with :
Code: Select all
'start' => 's'

in the code I posted above should do it ;)

Don't get tricked by the cache when testing the output.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby c4gamerz » Wed Nov 26, 2008 3:44 pm

well now sitemap.xml.gz is working but still same problem with forum url it shows like forum/utf-8-t4244.html and other topic urls are same like viewtopic etc :(
c4gamerz
 
Posts: 43
Joined: Wed Nov 26, 2008 11:18 am

Postby c4gamerz » Wed Nov 26, 2008 3:48 pm

tried clearing cache etc still not working :(
c4gamerz
 
Posts: 43
Joined: Wed Nov 26, 2008 11:18 am

Postby c4gamerz » Wed Nov 26, 2008 3:57 pm

lol you released rc2
c4gamerz
 
Posts: 43
Joined: Wed Nov 26, 2008 11:18 am

Postby SeO » Wed Nov 26, 2008 4:02 pm

Yes, but this time updating has really become easy ;)

THen, I don't get your issue, I see url such as : islamicteachings.org/forum/islamicteachings-org-ver-2-launched-t4913.html

on you forum, so what is the issue when you say :
c4gamerz wrote:well now sitemap.xml.gz is working but still same problem with forum url it shows like forum/utf-8-t4244.html and other topic urls are same like viewtopic etc

:?:
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby c4gamerz » Wed Nov 26, 2008 4:07 pm

no i was talking about topic and forum links in sitemap, sitemap index and rss etc. i just want exactly the same urls as

islamicteachings.org/forum/islamicteachings-org-ver-2-launched-t4913.html

in sitemap etc
c4gamerz
 
Posts: 43
Joined: Wed Nov 26, 2008 11:18 am

Postby c4gamerz » Wed Nov 26, 2008 4:08 pm

i am thinking about moving to your seo mod but i am afraid that i will have to loose my pagerank and some traffic :(
c4gamerz
 
Posts: 43
Joined: Wed Nov 26, 2008 11:18 am

Postby SeO » Wed Nov 26, 2008 5:25 pm

Found it, bug in gym_sitemaps/includes/phpbb_seo_class_light.php, replace :

Code: Select all
      $url = preg_replace('`\[.*\]`U','', 'utf-8');
      $url = htmlentities($url, ENT_COMPAT, $this->encoding);


with :

Code: Select all
      $url = preg_replace('`\[.*\]`U','', $url);
      $url = htmlentities($url, ENT_COMPAT, 'utf-8');


Sorry for this, shoudl work now.

About moving to our SEO mods, you can do it without losing indexing, SERPS or referrals with the Zero dupe, you would just have to keep your old rewriterule up and running in your phpBB3's .htaccess to properly redirect them all ;)
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby c4gamerz » Wed Nov 26, 2008 5:55 pm

hmm only working on forum sitemap

http://islamicteachings.org/forum/sitemap.php?forum=5

but url is in .php format ^^
c4gamerz
 
Posts: 43
Joined: Wed Nov 26, 2008 11:18 am

Postby SeO » Wed Nov 26, 2008 5:57 pm

Well, this part is the module url rewriting part, juste activate it in acp with the proper rewriterules as explained in install.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm


Postby c4gamerz » Wed Nov 26, 2008 6:01 pm

SeO wrote:Setting url rewritng type to advanced and replacing :
Code: Select all
'start' => '-'

with :
Code: Select all
'start' => 's'

in the code I posted above should do it ;)

Don't get tricked by the cache when testing the output.


shud i remove above change?
c4gamerz
 
Posts: 43
Joined: Wed Nov 26, 2008 11:18 am

Next

Return to GYM Sitemaps & RSS

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 14 guests