| |
| |
|
|
|
|
| |
|
| |
|
| :: |
| Author |
Message |
arkantos

Joined: 13 Feb 2007 Posts: 26 Location: Dark Side of Tha World
|
Posted: Thu Mar 01, 2007 3:53 am Post subject: sorry again hehehe |
|
|
very sorry but again i have problems, zero duplicate redirects even logged users to the .html rewrited post, i need this to be disables for users because they (and i) lose session when entering to a minimal rewrite área.
Greets.
Ive tried to | Code: |
if ( !$userdata['session_logged_in'] )
{
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$uri = $phpbb_seo->seo_req_uri();
$phpbb_seo->seo_start( $start, $board_config['topics_per_page'] );
$phpbb_seo->page_url = $phpbb_seo->seo_url['forum'][$forum_id] . $phpbb_seo->seo_delim['forum'] . $forum_id . $phpbb_seo->start . $phpbb_seo->seo_ext['forum'];
$phpbb_seo->seo_cond(!$userdata['session_logged_in'] && (strpos($uri, "sid=" ) !== FALSE ));
$topicday_redir = empty($_POST['topicdays']) && empty($_GET['topicdays']);
if ($_GET['topicdays'] == 0 || $_POST['topicdays'] == 0 ) {
$topicday_redir = TRUE;
}
if ( $phpbb_seo->do_redir || ( ($mark_read == '') && $topicday_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
}
|
but does not work. |
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13777
|
Posted: Thu Mar 01, 2007 12:01 pm Post subject: Re: sorry again hehehe |
|
|
well, it shoulmd work for links dealing with index.php.
Then, I still do not see any reasons why mod rewrite would be a problem for sessions, but, ho well, if you want to only redirect guest, you can do it all at one in the phpbb_seo_class.php file :
Find :
| Code: | function seo_redirect($url, $header = "301 Moved Permanently", $code = 301, $replace = TRUE) {
global $db; |
After add :
| Code: | global $userdata;
if ( $userdata['session_logged_in'] ) {
return;
} |
 |
_________________ 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 |
|
 |
arkantos

Joined: 13 Feb 2007 Posts: 26 Location: Dark Side of Tha World
|
Posted: Thu Mar 01, 2007 9:14 pm Post subject: Re: sorry again hehehe |
|
|
hi, it works for topis and index, but i think viewforum.php is still affected by the rewrite.
Also what does the "return;" does? it seems it cuts the function, but then what does "exit();" is for?
(im little bad in functions)
Thanks for the help, now i think my seo is complete now  |
|
|
| Back to top |
|
 |
HB phpBB SEO Team

Joined: 16 Oct 2006 Posts: 800
|
Posted: Fri Mar 02, 2007 3:42 am Post subject: Re: sorry again hehehe |
|
|
| return = leave current function, processing continues. exit = end all processing. |
_________________ Dan Kehn |
|
| Back to top |
|
 |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |