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  
 
   
How to test Zero duplicate?

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB SEO TooLKit  » Zero duplicate
::  
Author Message
diabolic.bg



Joined: 04 Feb 2008
Posts: 38
Location: Bulgaria

How to test Zero duplicate?Posted: Thu Feb 21, 2008 10:35 am    Post subject: How to test Zero duplicate?

Hi, wise boys!
After installing all your SEO mods today I have installed Zero duplicate.
For now I don't see any problems but I don't sure whether the mod works.
If I test -http://xxxxxx.com/phpbb2/topic150.html#9999 (I have a topic 150 but dont have a post 9999) URL opens topic 150.html#9999
But if I test -http://xxxxxx.com/phpbb2/topic850.html#9999 (don't have a topic 850) I get info: "The topic isn't exist".

Is this right? How can I test? Maybe I don't understand something... Embarassed
Back to top
SeO
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 15 Mar 2006
Posts: 2383

How to test Zero duplicate?Posted: Thu Feb 21, 2008 11:16 am    Post subject: Re: How to test Zero duplicate?

Yes it is.

The html anchor (#xx) is just used to find a specific part of the page if possible, it's not building another page.
And url and url#xx are not duplicates.

_________________
Back to top
diabolic.bg



Joined: 04 Feb 2008
Posts: 38
Location: Bulgaria

How to test Zero duplicate?Posted: Thu Feb 21, 2008 12:05 pm    Post subject: Re: How to test Zero duplicate?

I read some topic in this forum and now already I understand.
I have tasted all URLs from
Quote:
Performed redirections
index.php?c=xx => catxx.html

viewforum.php?t=xx => forumxx.html

viewforum.php?t=xx&start=xx => forumxx-yy.html

viewtopic.php?t=xx => topicxx.html

viewtopic.php?t=xx&view=prev/next => topicxx.html

viewtopic.php?t=xx&start=xx => topicxx-yy.html

viewtopic.php?p=xx => topicxx.html or topicxx-yy.html if required

profile.php?mode=viewprofile&u=xx => memberxx.html

Will get rid of SIDs and mark Vars in URLs for guests :
topicxx.html?sid=SID => topicxx.html
forumxx.html?mark=fids => forumxx.html


Will check $start consistency :
Example with 25 topics per pages :
forumxx-32.html => forumxx-25.html


Will by default HTTP 301 redirect index.php :
www.phpbb-seo.com/boards/index.php => www.phpbb-seo.com/boards/

Will automatically follow the eventual settings in the phpBB SEO mod rewrite like :
example.com/phpBB/ => example.com/phpBB/index.html

with my URLs and all is OK.
In my forums I have some pictures as links - for example -http://xxxxx.com/phpbb2/viewforum.php?f=38. Now it redirect to -http://xxxxx.com/phpbb2/forum38.html.

I think all is OK and thank you again! Very Happy

P.S. Is possible to redirect "Topic_post_not_exist" or "Forum_not_exist" to index or something else?
Or this will be bad for SEO?
Back to top
HB
phpBB SEO Team
phpBB SEO Team


Joined: 16 Oct 2006
Posts: 707

How to test Zero duplicate?Posted: Thu Feb 21, 2008 12:49 pm    Post subject: Re: How to test Zero duplicate?

diabolic.bg wrote:
Is possible to redirect "Topic_post_not_exist" or "Forum_not_exist" to index or something else?
Or this will be bad for SEO?

That's what I do. At one time I redirected to a not found page and added that page to the robots.txt file (so SEs would drop it from their index). I found that even if you return "not found" or "gone", search engines would not believe you for many, many months. They're probably assuming that a link that says it's gone may be a server bug. Anyway, changing it to a redirect to an existing page removes it from the SE indexes within a few weeks instead of a many months. That ends their fruitless rechecking; I can't see how that would hurt SEO.

_________________
Dan Kehn
Back to top
Visit poster's website
diabolic.bg



Joined: 04 Feb 2008
Posts: 38
Location: Bulgaria

How to test Zero duplicate?Posted: Thu Feb 21, 2008 1:10 pm    Post subject: Re: How to test Zero duplicate?

It are good news. How can I do it? Have you a topic here?
Back to top
HB
phpBB SEO Team
phpBB SEO Team


Joined: 16 Oct 2006
Posts: 707

How to test Zero duplicate?Posted: Thu Feb 21, 2008 1:43 pm    Post subject: Re: How to test Zero duplicate?

No, I don't, but it would look something like this:

Open viewtopic.php. Find:

Code:
if ( !($forum_topic_data = $db->sql_fetchrow($result)) )
{
   message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}


Replace with:

Code:
if ( !$row = $db->sql_fetchrow($result) )
{
   $phpbb_seo->seo_redirect($phpbb_seo->seo_path['phpbb_url']);
   exit;
}


Open viewforum.php. Find:
Code:
else
{
   message_die(GENERAL_MESSAGE, 'Forum_not_exist');
}


Replace with:

Code:
else
{
   $phpbb_seo->seo_redirect($phpbb_seo->seo_path['phpbb_url']);   
   exit;
}

_________________
Dan Kehn
Back to top
Visit poster's website
diabolic.bg



Joined: 04 Feb 2008
Posts: 38
Location: Bulgaria

How to test Zero duplicate?Posted: Thu Feb 21, 2008 1:47 pm    Post subject: Re: How to test Zero duplicate?

It's easy. I'll do right now.
Thank you, HB! Very Happy

EDIT

Sorry, it's don't work.
The first code after clicking to exist topic call out info 'Topic_post_not_exist'
Another I don't testing fully, but you give me an idea and I made a new code:

Open viewtopic.php. Find:

Code:
if ( !($forum_topic_data = $db->sql_fetchrow($result)) )
{
   message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}


Replace with:

Code:
if ( !($forum_topic_data = $db->sql_fetchrow($result)) )
{
   redirect(append_sid("index.$phpEx", true));
}


Open viewforum.php. Find:
Code:
else
{
   message_die(GENERAL_MESSAGE, 'Forum_not_exist');
}


Replace with:

Code:
else
{
   redirect(append_sid("index.$phpEx", true));
}


FIND:

Code:
//
// If the query doesn't return any rows this isn't a valid forum. Inform
// the user.
//
if ( !($forum_row = $db->sql_fetchrow($result)) )
{
   message_die(GENERAL_MESSAGE, 'Forum_not_exist');
   
}


REPLACE WITH:

Code:
//
// If the query doesn't return any rows this isn't a valid forum. Inform
// the user.
//
if ( !($forum_row = $db->sql_fetchrow($result)) )
{
   redirect(append_sid("index.$phpEx", true));
}


For now seems it works. Smile In my board this is fully working code.
Your second code (for viewforum.php) working too properly but must replace both "message_die(GENERAL_MESSAGE, 'Forum_not_exist');". Very Happy
Back to top
HB
phpBB SEO Team
phpBB SEO Team


Joined: 16 Oct 2006
Posts: 707

How to test Zero duplicate?Posted: Thu Feb 21, 2008 3:39 pm    Post subject: Re: How to test Zero duplicate?

Sorry, I assumed the URL rewriting mods were installed. Glad you figured it out.

_________________
Dan Kehn
Back to top
Visit poster's website
diabolic.bg



Joined: 04 Feb 2008
Posts: 38
Location: Bulgaria

How to test Zero duplicate?Posted: Thu Feb 21, 2008 3:45 pm    Post subject: Re: How to test Zero duplicate?

HB wrote:
Sorry, I assumed the URL rewriting mods were installed. Glad you figured it out.


I have installed Simple rewrite mod. Very Happy And all other SEO mods already.
Thanks for the idea.
Back to top
SeO
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 15 Mar 2006
Posts: 2383

How to test Zero duplicate?Posted: Thu Feb 21, 2008 9:45 pm    Post subject: Re: How to test Zero duplicate?

Do not use the phpBB redirect() function, it will output HTTP 302 headers which is not what you want at all in this case.

If HB's code does not work, it most likely means that your have some miss-configuration in phpBB main config (server name and script path).

It's the better way to do it.

You can though use :
Code:
   header("HTTP/1.1 301 Moved Permanently");
   redirect(append_sid("{$phpbb_root_path}index.$phpEx"));


Instead, but it will fail if your phpBB config is not set with the right domain and path.

HTTP1.0 could do the trick, in case you really do not make it :
Code:
   header("HTTP/1.0 301 Moved Permanently");
   redirect(append_sid("{$phpbb_root_path}index.$phpEx"));


But only the phpbb_seo method is 100% safe.
In all case check the header sent by the server as explained in the zero dupe install.

_________________
Back to top
diabolic.bg



Joined: 04 Feb 2008
Posts: 38
Location: Bulgaria

How to test Zero duplicate?Posted: Fri Feb 22, 2008 7:43 am    Post subject: Re: How to test Zero duplicate?

SeO wrote:

...it most likely means that your have some miss-configuration in phpBB main config (server name and script path).
...
Instead, but it will fail if your phpBB config is not set with the right domain and path.

You don't right - my domain and root path are correct write but I will test your code right now.

EDIT
This is the right code.
Code:
   header("HTTP/1.1 301 Moved Permanently");
   redirect(append_sid("{$phpbb_root_path}index.$phpEx"));

It is working now in my viewtopic.php and viewforum.php.

Thanks again! Very Happy
Back to top
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB SEO TooLKit  » Zero duplicate
Page 1 of 1

Navigation Similar Topics

Jump to: