Bug? URLs not rewritten when viewing user's posts

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

Moderator: Moderators

Bug? URLs not rewritten when viewing user's posts

Postby Steve06 » Thu May 22, 2008 12:21 pm

I have advanced seo mod for PHPBB3 perfectly installed and configured for my forum, but a forum user pointed me to the fact that when querying a registered user's posts, URLs in the main table are not rewritten.

Example (for admin user): http://www.unicp.de/forum/search.php?au ... 2&sr=posts

It gives out URLs of the form postXXX.html#44
Steve06
 
Posts: 21
Joined: Tue Mar 18, 2008 1:34 am

Advertisement

Postby MathieuM. » Thu May 22, 2008 12:26 pm

Hi,

I think you didn't upgrade your .htaccess :wink:


Mathieu.
Tennis et Actualité du tennis sur lemondedutennis.com ;)
User avatar
MathieuM.
phpBB SEO Team
phpBB SEO Team
 
Posts: 1469
Joined: Sun Feb 10, 2008 9:33 pm
Location: Rhône-Alpes

Postby Steve06 » Thu May 22, 2008 12:47 pm

Hi,

but the htaccess is just about the mod rewrite itself, i.e., it attributes the modified seo urls to the true phpbb script files.

I would expect the php code of the search.php file to output the correctly modified "seo-friendly" link that is used everywhere else to avoid duplicate content.
Steve06
 
Posts: 21
Joined: Tue Mar 18, 2008 1:34 am

Postby MathieuM. » Thu May 22, 2008 1:19 pm

Can you please post here your .htaccess ? :wink:


Mathieu.
Tennis et Actualité du tennis sur lemondedutennis.com ;)
User avatar
MathieuM.
phpBB SEO Team
phpBB SEO Team
 
Posts: 1469
Joined: Sun Feb 10, 2008 9:33 pm
Location: Rhône-Alpes

Postby Steve06 » Thu May 22, 2008 3:10 pm

this is the htaccess from the forum sub directory
Code: Select all
# Lines That should already be in your .htacess
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>

# You may need to un-comment the following line
# Options +FollowSymlinks
# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
RewriteEngine On
# REWRITE BASE
RewriteBase /forum/
# HERE IS A GOOD PLACE TO ADD THE WWW PREFIXE REDIRECTION

#####################################################
# PHPBB SEO REWRITE RULES - ADVANCED
#####################################################
# AUTHOR : dcz www.phpbb-seo.com
# STARTED : 01/2006
#################################
# FORUMS PAGES
###############
# FORUM INDEX REWRITERULE WOULD STAND HERE IF USED. 'forum' REQUIRES TO BE SET AS FORUM INDEX
# RewriteRule ^forum\.html$ index.php [QSA,L,NC]
# FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)/?(page([0-9]+)\.html)?$ viewforum.php?f=$1&start=$3 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER
RewriteRule ^[a-z0-9_-]*-f([0-9]+)/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
RewriteRule ^announces/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# TOPIC WITHOUT FORUM ID & DELIM
RewriteRule ^[a-z0-9_-]*/?[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# PROFILES SIMPLE
RewriteRule ^member([0-9]+)\.html$ memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
# USER MESSAGES SIMPLE
RewriteRule ^messages([0-9]+)(-([0-9]+))?\.html$ search.php?author_id=$1&sr=posts&start=$3 [QSA,L,NC]
# GROUPS SIMPLE
RewriteRule ^group([0-9]+)(-([0-9]+))?\.html$ memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ viewtopic.php?p=$1 [QSA,L,NC]
# THE TEAM
RewriteRule ^the-team\.html$ memberlist.php?mode=leaders [QSA,L,NC]
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

# FORUM WITHOUT ID & DELIM
# THESE FOUR LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^[a-z0-9_-]+/?(page([0-9]+)\.html)?$ viewforum.php?start=$2 [QSA,L,NC]
# END PHPBB PAGES
#####################################################
Steve06
 
Posts: 21
Joined: Tue Mar 18, 2008 1:34 am

Postby MathieuM. » Thu May 22, 2008 4:59 pm

Try with this .htaccess :

Code: Select all
# Lines That should already be in your .htacess
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>

# You may need to un-comment the following line
# Options +FollowSymlinks
# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
RewriteEngine On
# REWRITE BASE
RewriteBase /forum/
# HERE IS A GOOD PLACE TO ADD THE WWW PREFIXE REDIRECTION

#####################################################
# PHPBB SEO REWRITE RULES - ADVANCED
#####################################################
# AUTHOR : dcz www.phpbb-seo.com
# STARTED : 01/2006
#################################
# FORUMS PAGES
###############
# FORUM INDEX REWRITERULE WOULD STAND HERE IF USED. 'forum' REQUIRES TO BE SET AS FORUM INDEX
# RewriteRule ^forum\.html$ index.php [QSA,L,NC]
# FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)/?(page([0-9]+)\.html)?$ viewforum.php?f=$1&start=$3 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER
RewriteRule ^[a-z0-9_-]*-f([0-9]+)/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
RewriteRule ^announces/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# TOPIC WITHOUT FORUM ID & DELIM
RewriteRule ^[a-z0-9_-]*/?[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# PROFILES SIMPLE
RewriteRule ^member([0-9]+)\.html$ memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
# USER MESSAGES THROUGH USERNAME
RewriteRule ^member/([^/]+)/(topics|posts)/?(page([0-9]+)\.html)?$ search.php?author=$1&sr=$2&start=$4 [QSA,L,NC]
# GROUPS ADVANCED
RewriteRule ^[a-z0-9_-]*-g([0-9]+)(-([0-9]+))?\.html$ memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ viewtopic.php?p=$1 [QSA,L,NC]
# ACTIVE TOPICS
RewriteRule ^active-topics(-([0-9]+))?\.html$ search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
# UNANSWERED TOPICS
RewriteRule ^unanswered(-([0-9]+))?\.html$ search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
# NEW POSTS
RewriteRule ^newposts(-([0-9]+))?\.html$ search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
# THE TEAM
RewriteRule ^the-team\.html$ memberlist.php?mode=leaders [QSA,L,NC]
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

# FORUM WITHOUT ID & DELIM
# THESE FOUR LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^[a-z0-9_-]+/?(page([0-9]+)\.html)?$ viewforum.php?start=$2 [QSA,L,NC]
# END PHPBB PAGES
#####################################################



Mathieu :wink:
Tennis et Actualité du tennis sur lemondedutennis.com ;)
User avatar
MathieuM.
phpBB SEO Team
phpBB SEO Team
 
Posts: 1469
Joined: Sun Feb 10, 2008 9:33 pm
Location: Rhône-Alpes

Postby Steve06 » Thu May 22, 2008 6:19 pm

what did you change exactly? i can't see any differences at first sight.

and is it an installation bug or not?
Steve06
 
Posts: 21
Joined: Tue Mar 18, 2008 1:34 am

Postby MathieuM. » Thu May 22, 2008 6:29 pm

You didn't upgrade this part :

Code: Select all
# USER MESSAGES THROUGH USERNAME
RewriteRule ^member/([^/]+)/(topics|posts)/?(page([0-9]+)\.html)?$ search.php?author=$1&sr=$2&start=$4 [QSA,L,NC]
# GROUPS ADVANCED
RewriteRule ^[a-z0-9_-]*-g([0-9]+)(-([0-9]+))?\.html$ memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ viewtopic.php?p=$1 [QSA,L,NC]
# ACTIVE TOPICS
RewriteRule ^active-topics(-([0-9]+))?\.html$ search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
# UNANSWERED TOPICS
RewriteRule ^unanswered(-([0-9]+))?\.html$ search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
# NEW POSTS
RewriteRule ^newposts(-([0-9]+))?\.html$ search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]


which was introduced with phpBB 3.0.1 :wink:
It's not a bug, upload the .htaccess i gave you, it should work fine.


Mathieu.
Tennis et Actualité du tennis sur lemondedutennis.com ;)
User avatar
MathieuM.
phpBB SEO Team
phpBB SEO Team
 
Posts: 1469
Joined: Sun Feb 10, 2008 9:33 pm
Location: Rhône-Alpes

Postby Steve06 » Thu May 22, 2008 10:00 pm

i overwrote the htaccess by the file u gave me but it didnt change anything.

you can check this with the link above to my forum.

maybe something else must be changed?
Steve06
 
Posts: 21
Joined: Tue Mar 18, 2008 1:34 am

Postby MathieuM. » Thu May 22, 2008 10:48 pm

So, have you activate the virtual folders profil ?
If not :arrow: ACP :arrow: phpBB SEO :arrow: phpBB SEO Class Settings :arrow: Virtual folder Profiles (choose Yes).


Mathieu :wink:
Tennis et Actualité du tennis sur lemondedutennis.com ;)
User avatar
MathieuM.
phpBB SEO Team
phpBB SEO Team
 
Posts: 1469
Joined: Sun Feb 10, 2008 9:33 pm
Location: Rhône-Alpes

Postby Steve06 » Fri May 23, 2008 8:09 am

i just checked that:

virtual folders are already on
Steve06
 
Posts: 21
Joined: Tue Mar 18, 2008 1:34 am

Postby MathieuM. » Fri May 23, 2008 8:36 am

And what about the Virtual folder Profils ? :wink:
Did you upload the .htaccess on your /forum folder ?


Mathieu.
Tennis et Actualité du tennis sur lemondedutennis.com ;)
User avatar
MathieuM.
phpBB SEO Team
phpBB SEO Team
 
Posts: 1469
Joined: Sun Feb 10, 2008 9:33 pm
Location: Rhône-Alpes

Re: Bug? URLs not rewritten when viewing user's posts

Postby SeO » Fri May 23, 2008 2:45 pm

Steve06 wrote:It gives out URLs of the form postXXX.html#44


These links are actually url rewriten, would be viewtopic.php.p=xx if not.

When searching for post, you see post urls, when searching for topics, you see topic urls, there is no efficient solution to transform post url to topic urls in search pages, since it would most likely require a SQL per post.
http://phpbb3.phpbb-seo.net/member/SeO/posts/ VS http://phpbb3.phpbb-seo.net/member/SeO/topics/
It's not an SEO issue as long as you install the advised robots.txt, the zero duplicate mod can as well redirect these links in case some where already spidered and cached.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby Steve06 » Fri May 23, 2008 3:29 pm

MathieuM. wrote:And what about the Virtual folder Profils ? :wink:
Did you upload the .htaccess on your /forum folder ?


Mathieu.


1. Under SEO Class Settings, in the ACP, I find only Virtual Folder, not Virtual Folder Profiles. The option you mention doesn't exist there.

2. Yes, I uploaded the file to the forum folder again (otherwise I would have overwritten the htaccess of my main site).
Steve06
 
Posts: 21
Joined: Tue Mar 18, 2008 1:34 am

Re: Bug? URLs not rewritten when viewing user's posts

Postby Steve06 » Fri May 23, 2008 3:37 pm

SeO wrote:
Steve06 wrote:It gives out URLs of the form postXXX.html#44


These links are actually url rewriten, would be viewtopic.php.p=xx if not.

When searching for post, you see post urls, when searching for topics, you see topic urls, there is no efficient solution to transform post url to topic urls in search pages, since it would most likely require a SQL per post.
http://phpbb3.phpbb-seo.net/member/SeO/posts/ VS http://phpbb3.phpbb-seo.net/member/SeO/topics/
It's not an SEO issue as long as you install the advised robots.txt, the zero duplicate mod can as well redirect these links in case some where already spidered and cached.


I checked my robots.txt and it includes the line
Code: Select all
Disallow: /forum/post

so in fact it won't create duplicate content. I have also zero duplicate installed, and in the ACP, it has an option concerning the posts:

Posts Redirections:
This option will determine how to handle post urls; it can take four values :

* off, do not redirect post url, whatever the case,
* post, only make sure postxx.html is used for a post url,
* guest, redirect guests if required to the corresponding topic url rather than to the postxx.html, and only make sure postxx.html is used for logged users,
* all, redirect if required to the corresponding topic url.


Please Note

Keeping the postxx.html URLs is harmless SEO wise as long as you keep the disallow on post urls in your robots.txt.
Redirecting them all will most likely produce the most redirections among all.
If you redirect postxx.html in all cases, this as well mean that a message that would be posted in a thread and then moved in another one will see it's url changing, which thanks to the zero duplicate mod is of no harm SEO wise, but the previous link to the post won't link to it anymore in such case.


What I learn from it, is that if you really want to, you can force the all post links to be redirected, but that would create hundreds or thousands of redirections and be very inefficient.

So I think I will keep it as it is.

I just have a conceptual question: Isn't it possible to use URLs consisting of the topic and a #xy at the end for the post number? (e.g. http://www.unicp.de/forum/vervollstaend ... t47.html#2)

Bye and thanks your support so far
Steve
Steve06
 
Posts: 21
Joined: Tue Mar 18, 2008 1:34 am

Next

Return to Advanced SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 19 guests