My issues using the mod - wrong URLs

phpBB3 SEO Advanced mod Rewrite support forum.
This mods performs URL rewriting for phpBB, injecting forums and topic titles in their URLs.

Moderator: Moderators

My issues using the mod - wrong URLs

Postby Frieten » Sun Dec 01, 2013 6:22 pm

Hello,

I am struggling with some problems using this mod.

The URLs appears to be wrong. On /memberID.html I have URLs like
search.php?author_id=ID&sr=posts Where it should be memberID-posts.html
The same is for the topics:
search.php?author_id=ID&sr=topics Where it should be memberID-topics.html
Why it is wrong?

Moreover on search.php?author_id=ID&sr=posts I have URLs to posts/topics like
/postID.html#pID
However on the /forum-keyword-fID.html I have proper URLs with injected keyword like:
/topics-keyword-tID.html
It completely doesn't make any sense.

In addition google didn't index topics with injected keywords. Insted it indexed all the topics with adres like /postID.html

I have read all the tutorials and everything is set well. It just doesn't work like it is described.

Can someone help me please?
Frieten
 
Posts: 4
Joined: Sun Dec 01, 2013 6:09 pm

Advertisement

Re: My issues using the mod - wrong URLs

Postby HB » Mon Dec 02, 2013 5:58 pm

The search.php results are not URL rewritten, i.e., searches for an author's posts are not mapped to topic-injected URLs for performance reasons. It should not matter since the postNNN.html URLs should be redirected to the canonical URL, assuming you have the no dupe option enabled in the ACP.
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1561
Joined: Mon Oct 16, 2006 2:25 am

Re: My issues using the mod - wrong URLs

Postby Frieten » Mon Dec 02, 2013 6:51 pm

Ok, thanks for reply.

What's about he first issue.
Why does search.php?author_id=ID&sr=posts/topics URL are not rewritten?

I found that on phpbb-seo forum it's well rewritten.
Any guesses.
Frieten
 
Posts: 4
Joined: Sun Dec 01, 2013 6:09 pm

Re: My issues using the mod - wrong URLs

Postby HB » Mon Dec 02, 2013 10:09 pm

Shows what I know, I never noticed it was mapped to /username/posts. :roll: Looking at the ACP, there's an option: ACP > PHPBB SEO > phpBB SEO Class settings > Common Search and User messages pages rewriting (yes/no). That's a nice touch, but my original point is that it's a nicety, not something that would have a SEO impact (the ACP help offers a few other hints).
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1561
Joined: Mon Oct 16, 2006 2:25 am

Re: My issues using the mod - wrong URLs

Postby Frieten » Tue Dec 03, 2013 9:07 am

No, according to the description basically it should be mapped to phpBB/memberxx-topics.html.
However, it isn't.
Frieten
 
Posts: 4
Joined: Sun Dec 01, 2013 6:09 pm

Re: My issues using the mod - wrong URLs

Postby HB » Tue Dec 03, 2013 12:36 pm

I tried "Common Search and User messages pages rewriting" = yes on my local test and it worked as expected. Maybe your phpbb_cache.php file is not writeable? Here's the relevant line from mine:

Code: Select all
$this->cache_config['settings'] = array ( 'url_rewrite' => true, 'modrtype' => 2, 'profile_inj' => true, 'profile_noids' => true, 'rewrite_usermsg' => true, 'rem_sid' => true, 'rem_hilit' => true, 'rem_small_words' => false, 'virtual_folder' => true, 'virtual_root' => true, 'cache_layer' => true, 'rem_ids' => true, 'no_dupe' => array ( 'on' => true, ), 'zero_dupe' => array ( 'on' => true, 'strict' => true, 'post_redir' => 'all', ), 'profile_vfolder' => true, 'copyrights' => array ( 'img' => false, 'txt' => '', 'title' => '', ), 'sql_rewrite' => true, 'rewrite_files' => false, );


It also requires changes to .htaccess - the relevant excerpt from mine is below:

Code: Select all
# PROFILES THROUGH USERNAME
RewriteRule ^member/([^/]+)/?$ /forums/memberlist.php?mode=viewprofile&un=$1 [QSA,L,NC]
# USER MESSAGES THROUGH USERNAME
RewriteRule ^member/([^/]+)/(topics|posts)/?(page([0-9]+)\.html)?$ /forums/search.php?author=$1&sr=$2&start=$4 [QSA,L,NC]
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1561
Joined: Mon Oct 16, 2006 2:25 am

Re: My issues using the mod - wrong URLs

Postby Frieten » Thu Dec 05, 2013 12:41 pm

Yes, thanks. Now it works fine.

However, I'm wondering if there is a possibility to get topics' URLs in such a pattern:
/topic-title-txx/
You know what I mean... virtual folders for topics. Because normally each topic address has .html at the end which makes the URL longer.
Frieten
 
Posts: 4
Joined: Sun Dec 01, 2013 6:09 pm

Re: My issues using the mod - wrong URLs

Postby HB » Thu Dec 05, 2013 4:26 pm

The phpBB-SEO mod doesn't support "virtual" topics, but I don't think it would be hard to implement. The mod already tries to figure it out in viewtopic.php:

Code: Select all
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if (empty($_REQUEST['f'])) {
   $phpbb_seo->get_forum_id($session_forum_id);
   if ($session_forum_id > 0) {
      $_REQUEST['f'] = (int) $session_forum_id;
   }
}
if (!empty($_REQUEST['hilit'])) {
   $_REQUEST['hilit'] = rawurldecode($_REQUEST['hilit']);
   if (!$phpbb_seo->is_utf8($_REQUEST['hilit'])) {
      $_REQUEST['hilit'] = utf8_normalize_nfc(utf8_recode($_REQUEST['hilit'], 'iso-8859-1'));
   }
}
// www.phpBB-SEO.com SEO TOOLKIT END

Later in the same viewtopic.php, it checks if $forum_id is set and maps it based on the topic ID if it isn't. That costs an extra SQL query, but otherwise I assume it would work otherwise with the required .htaccess and phpbb_seo_class.php updates (no, I haven't tried or tested such a modification).
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1561
Joined: Mon Oct 16, 2006 2:25 am


Return to Advanced SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 8 guests