phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
memberxx.html 404 not found: Advanced rewrite, Zero Dupe

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite  » Advanced mod Rewrite
::  
Author Message
coyote
phpBB SEO Team
phpBB SEO Team


Joined: 11 May 2007
Posts: 72

memberxx.html 404 not found: Advanced rewrite, Zero DupePosted: Fri Jul 13, 2007 4:35 pm    Post subject: memberxx.html 404 not found: Advanced rewrite, Zero Dupe

Did I miss something? Everything works beautifully except member profiles. Here's my .htaccess:

Code:
# You could need to un-comment the following line
# Options +FollowSymlinks
RewriteEngine On
RewriteBase /

#########################################################
# PHPBB SEO REWRITE RULES            #
#########################################################
# AUTHOR : dcz http://www.phpbb-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# FORUM INDEX (un-comment if used)
# RewriteRule ^index\.html$ /index.php [QSA,L,NC]
# FORUM PROTECTION RULE
# RewriteRule ^[a-z0-9_-]+/([^/]+\.html)$ /index.php [R=301,L,NC]
# CATEGORIES
RewriteRule ^[a-z0-9_-]*-c([0-9]+)\.html$ /index.php?c=$1 [QSA,L,NC]
# PAGINATED FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)-([0-9]+)\.html$ /viewforum.php?f=$1&start=$2 [QSA,L,NC]
# FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)\.html$ /viewforum.php?f=$1 [QSA,L,NC]
# PAGINATED TOPIC
RewriteRule ^[a-z0-9_-]*-t([0-9]+)-([0-9]+)\.html$ /viewtopic.php?t=$1&start=$2 [QSA,L,NC]
# TOPIC
RewriteRule ^[a-z0-9_-]*-t([0-9]+)\.html$ /viewtopic.php?t=$1 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ /viewtopic.php?p=$1 [QSA,L,NC]
#PROFILES
RewriteRule ^member([0-9]+)\.html$ /profile.php?mode=viewprofile&u=$1 [QSA,L,NC]
# END PHPBB PAGES
#####################################################

#########################################################
# GYM SITEMAPS AND RSS REWRITE RULES         #
#########################################################
# AUTHOR : dcz http://www.phpbb-seo.com/
# STARTED : 2006/02/22
########################
# RSS main
RewriteRule ^rss-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /rss.php?$1&$2 [L]
# RSS forums
RewriteRule ^forums-rss-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /rss.php?forum&c&$1&$2 [L]
# RSS all
RewriteRule ^([a-zA-Z0-9_-]+)-rss([0-9]*)-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /rss.php?$1=$2&$3&$4 [L]
# RSS forum topics
RewriteRule ^.+-rf([0-9]+)-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /rss.php?forum=$1&$2&$3 [L]
# SitemapIndex
RewriteRule ^sitemaps\.(xml(\.gz)?)$ /sitemap.php [L]
# Sitemap modules
RewriteRule ^([a-zA-Z0-9_-]+)-sitemap\.(xml(\.gz)?)$ /sitemap.php?$1 [L]
# Forum Sitemaps
RewriteRule ^.+-gf([0-9]+)\.(xml(\.gz)?)$ /sitemap.php?forum=$1 [L]
# Yahoo! urllist.txt
RewriteRule ^urllist\.(txt(\.gz)?)$ /urllist.php [L]
#########################################################
# END GYM SITEMAPS AND RSS REWRITE RULES      #
#########################################################




If you need to check out my forum, it's here at RSD Support. If you need a login, I've created one for you.

username: phpbbseo
password: phpbbseo

Thanks! If I get this working properly, I'm going to go back and undo the mixed mod rewrite on my other forum and do the advanced. I like having the topic names embedded in the URL. My other forum is American Politics Forum.
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

memberxx.html 404 not found: Advanced rewrite, Zero DupePosted: Fri Jul 13, 2007 5:36 pm    Post subject: Re: memberxx.html 404 not found: Advanced rewrite, Zero Dupe

I bet on a mistake while applying the Zero dupe code changes in usercp_viewprofile.php :

Code:
#
#-----[ OPEN ]------------------------------------------
#


includes/usercp_viewprofile.php

#
#-----[ FIND ]------------------------------------------
#

if (!$profiledata)
{
   message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
}

#
#-----[ AFTER, ADD ]------------------------------------------
#

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$uri = $phpbb_seo->seo_req_uri();
$phpbb_seo->seo_cond(!$userdata['session_logged_in'] && (strpos($uri, "sid=" ) !== FALSE ));
$phpbb_seo->page_url = $phpbb_seo->seo_static['user'] . $profiledata['user_id'] . $phpbb_seo->seo_ext['user'];
if ( $phpbb_seo->do_redir || strpos($uri, $phpbb_seo->page_url) === FALSE) {
   $phpbb_seo->seo_redirect($phpbb_seo->seo_path['phpbb_url'] . $phpbb_seo->page_url);
}
// www.phpBB-SEO.com SEO TOOLKIT END


Your links isn't memberxx.html, but rather member.html Wink

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
coyote
phpBB SEO Team
phpBB SEO Team


Joined: 11 May 2007
Posts: 72

memberxx.html 404 not found: Advanced rewrite, Zero DupePosted: Fri Jul 13, 2007 5:42 pm    Post subject: Re: memberxx.html 404 not found: Advanced rewrite, Zero Dupe

OR

I put that line in the wrong spot. I suspected it was a problem with usercp_viewprofile. This is what I had:

Code:
if ( !defined('IN_PHPBB') )
{
   die("Hacking attempt");
   exit;
}

if ( empty($HTTP_GET_VARS[POST_USERS_URL]) || $HTTP_GET_VARS[POST_USERS_URL] == ANONYMOUS )
{
   message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
}
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$uri = $phpbb_seo->seo_req_uri();
$phpbb_seo->seo_cond(!$userdata['session_logged_in'] && (strpos($uri, "sid=" ) !== FALSE ));
$phpbb_seo->page_url = $phpbb_seo->seo_static['user'] . $profiledata['user_id'] . $phpbb_seo->seo_ext['user'];
if ( $phpbb_seo->do_redir || strpos($uri, $phpbb_seo->page_url) === FALSE) {
   $phpbb_seo->seo_redirect($phpbb_seo->seo_path['phpbb_url'] . $phpbb_seo->page_url);
}
// www.phpBB-SEO.com SEO TOOLKIT END
$profiledata = get_userdata($HTTP_GET_VARS[POST_USERS_URL]);

if (!$profiledata)
{
   message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
}



I put it after the wrong 'no user id specified'. This is what I have now:

Code:
if ( !defined('IN_PHPBB') )
{
   die("Hacking attempt");
   exit;
}

if ( empty($HTTP_GET_VARS[POST_USERS_URL]) || $HTTP_GET_VARS[POST_USERS_URL] == ANONYMOUS )
{
   message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
}
$profiledata = get_userdata($HTTP_GET_VARS[POST_USERS_URL]);

if (!$profiledata)
{
   message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
}

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$uri = $phpbb_seo->seo_req_uri();
$phpbb_seo->seo_cond(!$userdata['session_logged_in'] && (strpos($uri, "sid=" ) !== FALSE ));
$phpbb_seo->page_url = $phpbb_seo->seo_static['user'] . $profiledata['user_id'] . $phpbb_seo->seo_ext['user'];
if ( $phpbb_seo->do_redir || strpos($uri, $phpbb_seo->page_url) === FALSE) {
   $phpbb_seo->seo_redirect($phpbb_seo->seo_path['phpbb_url'] . $phpbb_seo->page_url);
}
// www.phpBB-SEO.com SEO TOOLKIT END
$sql = "SELECT *
   FROM " . RANKS_TABLE . "
   ORDER BY rank_special, rank_min";


I hadn't noticed until you made me go back and look carefully at that file. Thanks!
Back to top
Visit poster's website
coyote
phpBB SEO Team
phpBB SEO Team


Joined: 11 May 2007
Posts: 72

memberxx.html 404 not found: Advanced rewrite, Zero DupePosted: Fri Jul 13, 2007 5:44 pm    Post subject: Re: memberxx.html 404 not found: Advanced rewrite, Zero Dupe

You are awesome, dcz. It works just fine now. Merci beaucoup!
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

memberxx.html 404 not found: Advanced rewrite, Zero DupePosted: Fri Jul 13, 2007 5:44 pm    Post subject: Re: memberxx.html 404 not found: Advanced rewrite, Zero Dupe

You're welcome Wink

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite  » Advanced mod Rewrite
Page 1 of 1

Navigation Similar Topics

Jump to: