How to test Zero duplicate?

Zero duplicate support forum.
Personalized HTTP 301 dynamic redirections.

Moderator: Moderators

How to test Zero duplicate?

Postby diabolic.bg » Thu Feb 21, 2008 10:35 am

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... :oops:
diabolic.bg
PR0
PR0
 
Posts: 52
Joined: Mon Feb 04, 2008 4:48 pm
Location: Bulgaria

Advertisement

Postby SeO » Thu Feb 21, 2008 11:16 am

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.
SeO
Admin
Admin
 
Posts: 6333
Joined: Wed Mar 15, 2006 9:41 pm

Postby diabolic.bg » Thu Feb 21, 2008 12:05 pm

I read some topic in this forum and now already I understand.
I have tasted all URLs from
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! :D

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?
diabolic.bg
PR0
PR0
 
Posts: 52
Joined: Mon Feb 04, 2008 4:48 pm
Location: Bulgaria

Postby HB » Thu Feb 21, 2008 12:49 pm

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
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1211
Joined: Mon Oct 16, 2006 2:25 am

Postby diabolic.bg » Thu Feb 21, 2008 1:10 pm

It are good news. How can I do it? Have you a topic here?
diabolic.bg
PR0
PR0
 
Posts: 52
Joined: Mon Feb 04, 2008 4:48 pm
Location: Bulgaria

Postby HB » Thu Feb 21, 2008 1:43 pm

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

Open viewtopic.php. Find:

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


Replace with:

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


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


Replace with:

Code: Select all
else
{
   $phpbb_seo->seo_redirect($phpbb_seo->seo_path['phpbb_url']);   
   exit;
}
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1211
Joined: Mon Oct 16, 2006 2:25 am

Postby diabolic.bg » Thu Feb 21, 2008 1:47 pm

It's easy. I'll do right now.
Thank you, HB! :D

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: Select all
if ( !($forum_topic_data = $db->sql_fetchrow($result)) )
{
   message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}


Replace with:

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


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


Replace with:

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


FIND:

Code: Select all
//
// 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: Select all
//
// 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. :) 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');". :D
diabolic.bg
PR0
PR0
 
Posts: 52
Joined: Mon Feb 04, 2008 4:48 pm
Location: Bulgaria

Postby HB » Thu Feb 21, 2008 3:39 pm

Sorry, I assumed the URL rewriting mods were installed. Glad you figured it out.
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1211
Joined: Mon Oct 16, 2006 2:25 am

Postby diabolic.bg » Thu Feb 21, 2008 3:45 pm

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


I have installed Simple rewrite mod. :D And all other SEO mods already.
Thanks for the idea.
diabolic.bg
PR0
PR0
 
Posts: 52
Joined: Mon Feb 04, 2008 4:48 pm
Location: Bulgaria

Postby SeO » Thu Feb 21, 2008 9:45 pm

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: Select all
   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: Select all
   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.
SeO
Admin
Admin
 
Posts: 6333
Joined: Wed Mar 15, 2006 9:41 pm

Postby diabolic.bg » Fri Feb 22, 2008 7:43 am

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: Select all
   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! :D
diabolic.bg
PR0
PR0
 
Posts: 52
Joined: Mon Feb 04, 2008 4:48 pm
Location: Bulgaria


Return to Zero duplicate phpBB2

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 2 guests