| |
|
| :: |
| Author |
Message |
MBourgeois
Joined: 22 May 2007 Posts: 5
|
Posted: Wed May 23, 2007 2:16 pm Post subject: Redirect -> 403 |
|
|
Hi I just installed Mixed mod rewrite and I'm getting 404s when trying to view any category.
Here's the forum: http://pctattletale.com/forums
And the .htaccess that I uploaded in the root folder:
| 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 ^forums/index\.html$ /phpbb/index.php [QSA,L,NC]
# FORUM PROTECTION RULE
# RewriteRule ^forums/[a-z0-9_-]+/([^/]+\.html)$ /phpbb/index.php [R=301,L,NC]
# CATEGORIES
RewriteRule ^forums/[a-z0-9_-]*-c([0-9]+)\.html$ /phpbb/index.php?c=$1 [QSA,L,NC]
# PAGINATED FORUM
RewriteRule ^forums/[a-z0-9_-]*-f([0-9]+)-([0-9]+)\.html$ /phpbb/viewforum.php?f=$1&start=$2 [QSA,L,NC]
# FORUM
RewriteRule ^forums/[a-z0-9_-]*-f([0-9]+)\.html$ /phpbb/viewforum.php?f=$1 [QSA,L,NC]
# PAGINATED TOPIC
RewriteRule ^forums/topic([0-9]+)-([0-9]+)\.html$ /phpbb/viewtopic.php?t=$1&start=$2 [QSA,L,NC]
# TOPIC
RewriteRule ^forums/topic([0-9]+)\.html$ /phpbb/viewtopic.php?t=$1 [QSA,L,NC]
# POST
RewriteRule ^forums/post([0-9]+)\.html$ /phpbb/viewtopic.php?p=$1 [QSA,L,NC]
#PROFILES
RewriteRule ^forums/member([0-9]+)\.html$ /phpbb/profile.php?mode=viewprofile&u=$1 [QSA,L,NC]
# END PHPBB PAGES
#####################################################
|
|
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
Posted: Wed May 23, 2007 2:22 pm Post subject: Re: Redirect -> 403 |
|
|
And welcome
It looks like you have some "phpbb" left overs in your .htaccess, you need to replace them all, with "forums" in your case.
It's as well possible that, depending on your server configuration, you'd need to get rid of the slashes, at the beginning of the path to the physical scripts in the rewriterules :
| Code: | | RewriteRule ^forums/post([0-9]+)\.html$ /forums/viewtopic.php?p=$1 [QSA,L,NC] |
VS :
| Code: |
RewriteRule ^forums/post([0-9]+)\.html$ forums/viewtopic.php?p=$1 [QSA,L,NC] |
Besides, if mod_rewrite is available, it will work
++ |
_________________ 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 |
|
 |
MBourgeois
Joined: 22 May 2007 Posts: 5
|
Posted: Wed May 23, 2007 2:27 pm Post subject: Re: Redirect -> 403 |
|
|
Merci pour la rapidité de la réponse Faudrait mettre un paneau pour les gens un peu débile qui ne remarquent pas qu'il y a deux remplacements par ligne... comme bibi!!
Thanks again for the great mod  |
|
|
| Back to top |
|
 |
AmirAbbas phpBB SEO Team


Joined: 11 May 2006 Posts: 529 Location: IRAN
|
|
| Back to top |
|
 |
MBourgeois
Joined: 22 May 2007 Posts: 5
|
Posted: Wed May 23, 2007 3:16 pm Post subject: Re: Redirect -> 403 |
|
|
I checked it myself when logged out and didn't have any... Also I thought it would be useless to install it since Zero duplicate also removes SIDs?
Well I installed it too... but I just noticed there's another problem. When trying to view members' profiles it first redirects it to memberxx.html which ought be fine IF there wasn't a second redirection to member.html regardless of the user, causing a 404. |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
Posted: Thu May 24, 2007 10:20 pm Post subject: Re: Redirect -> 403 |
|
|
| MBourgeois wrote: | Merci pour la rapidité de la réponse Faudrait mettre un paneau pour les gens un peu débile qui ne remarquent pas qu'il y a deux remplacements par ligne... comme bibi!!
|
Noticed the french speaking forum ?
Anyway, It's still better I think to install the cyber alien guest sessions mod, otherwise, bots would still find different url each time they start a new sessions, when SIDs are outputted on the links on the first page load, even if they are in the end HTTP 301 redirected with the zero dupe, it's still time loss to show them all these.
Besides, it's easy to install so ...
About the profiles, it look like you need to double check the includes/usercp_viewprofile.php code changes, could be an AFTER ADD implemented as A BEFORE ADD during install.
++ |
_________________ 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 |
|
 |
MBourgeois
Joined: 22 May 2007 Posts: 5
|
Posted: Thu May 24, 2007 10:35 pm Post subject: Re: Redirect -> 403 |
|
|
I did, but I like speaking English too
I triple-checked that file and I all looks fine.
| Code: | <?php
/***************************************************************************
* usercp_viewprofile.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: usercp_viewprofile.php,v 1.5.2.6 2005/09/14 18:14:30 acydburn Exp $
*
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
***************************************************************************/
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']);
}
|
Cut the file halfway because it's exceedingly long.
I think Zero dup is the one that screwed it up because it worked fine before I installed it but now Kaput..
The last part of my .htaccess:
| Code: |
#PROFILES
RewriteRule ^forum/member([0-9]+)\.html$ /forum/profile.php?mode=viewprofile&u=$1 [QSA,L,NC] |
If you'd like to test for yourself, http://pctattletale.com/forums is still valid. |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
Posted: Thu May 24, 2007 11:20 pm Post subject: Re: Redirect -> 403 |
|
|
Nope :
| 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 |
AFTER ADD
And no problem with English, feel free to stop by in the french forum when you like
++ |
_________________ 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 |
|
 |
MBourgeois
Joined: 22 May 2007 Posts: 5
|
Posted: Thu May 24, 2007 11:30 pm Post subject: Re: Redirect -> 403 |
|
|
Aaaaaaah! Hadn't noticed there was that same line twice. Did a search on "message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);" and this is how it happened
Thanks for pointing it out, I can be desperatly stubborn when it comes to doubles. |
|
|
| Back to top |
|
 |
|
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|