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  
 
   
Check 301 before installing

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB SEO TooLKit  » Zero duplicate
::  
Author Message
euroman
PR0
PR0


Joined: 21 Oct 2006
Posts: 81

Check 301 before installingPosted: Wed Jan 24, 2007 3:22 pm    Post subject: Check 301 before installing

Quote:
If this is not enough to have your server return the correct headers, I'm afraid to tell you you should consider
changing Wink


Is there a way to check if the server is up for the job before installing the zerodub?
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

Check 301 before installingPosted: Wed Jan 24, 2007 3:54 pm    Post subject: Re: Check 301 before installing

Well, yes, it's possible, but the easiest and most secure way to check is to check the actual code.

It could be a good idea to add a special file to perform these test in the install, will think about it.

By this time, you can for example just implement the phpbb_seo_class.php code changes, and just mod index.php for example.

Then, you'd be able to check the redirections, testing a false title in a category URL, something like :
example.com/this-is-not-the-correct-title-cxx.html

With xx being a real cat id in your phpBB install.

Chances are very little that wrong header would be returned, but it's a very important matter.
So that's why we have preferred to warn our member about how important it is to make sure about the headers.
In general, these tests will be positive, in few cases, the .htaccess code changes will be necessary, I have never seen an example where it would not be enough so far, but, who knows.
It just mandatory to check, that's all, not because the code is not stable, but because of some server config exceptions.

++

_________________
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
euroman
PR0
PR0


Joined: 21 Oct 2006
Posts: 81

Check 301 before installingPosted: Wed Jan 24, 2007 4:14 pm    Post subject: Re: Check 301 before installing

OK - I have:

1. installed the simple rewrite update (after which everything worked fine)

2. Installed zerodup.

After 2. I have strage problems

fx -http://www.mysite.dk/login.php says page not exist

When I am logged in and try to log out it says -http://www.mysite.dk/login.php?logout=true&sid=1b5b7fd7730c70522f39cb3bf9f7551b

does not exist.

Quote:
HTTP Status Code: HTTP/1.1 301
is ok


Last edited by euroman on Sat Mar 17, 2007 6:32 pm; edited 1 time in total
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

Check 301 before installingPosted: Wed Jan 24, 2007 4:25 pm    Post subject: Re: Check 301 before installing

Ho, I see.

So the problem is not login.php, it's just that after you log-in, you're redirected to -http://www.example.com/index.php, which by default will as well be redirected to -http://www.example.com/

So, you see :

Quote:
Moved Permanently
The document has moved here.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.


Which is only telling you that the url was moved permanently but without redirecting (it should).

So possible causes :
- ErrorDocument : As the message mention it, did you implement some custom ErrorDocument ? Including 301 headers ?
- problem with code install. If you look at the link provided in the "here" link in the error message returned, you'll see it's the same link as the one that should be redirected, the one requested.

So it could only be because of the additional 500, but could as well mean you did not install all the mod properly.

So please tell me more about your ErrorDocument settings.

++

_________________
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


Last edited by dcz on Mon Mar 19, 2007 9:43 pm; edited 1 time in total
Back to top
Visit poster's website
euroman
PR0
PR0


Joined: 21 Oct 2006
Posts: 81

Check 301 before installingPosted: Wed Jan 24, 2007 4:28 pm    Post subject: Re: Check 301 before installing

Sorry, what is a ErrorDocument? Where do I find ErrorDocument settings?
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

Check 301 before installingPosted: Wed Jan 24, 2007 4:35 pm    Post subject: Re: Check 301 before installing

In your .htaccess, or Vhost.

All right, let's do an easier test :

upload a file with this inside :

Code:
<?php

header("Status: 301 Moved Permanently", TRUE, 301);
header("Location: http://www.example.com/");
exit();

?>


Upload it where you want and load it in your browser, you should be redirected to -http://www.thegame-online.dk/

If not, we'll test other options for this, as there are some 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


Last edited by dcz on Mon Mar 19, 2007 9:42 pm; edited 1 time in total
Back to top
Visit poster's website
euroman
PR0
PR0


Joined: 21 Oct 2006
Posts: 81

Check 301 before installingPosted: Wed Jan 24, 2007 4:39 pm    Post subject: Re: Check 301 before installing

I uploaded in a file test.php

Its like it cant find the file:

Quote:
The page cannot be displayed
The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings.

etc.


Same message both when mod installed and not installed.
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

Check 301 before installingPosted: Wed Jan 24, 2007 5:19 pm    Post subject: Re: Check 301 before installing

All right, try :

Code:
<?php

header("HTTP/1.1 301 Moved Permanently", TRUE, 301);
header("Location: http://www.example.com/");
exit();

?>


As as well, try replacing TRUE, with FALSE, just in case.

It's bad luck, header should work on all servers.

And make sure you upload the test.php file in a browsable folder 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


Last edited by dcz on Mon Mar 19, 2007 9:42 pm; edited 2 times in total
Back to top
Visit poster's website
euroman
PR0
PR0


Joined: 21 Oct 2006
Posts: 81

Check 301 before installingPosted: Wed Jan 24, 2007 5:24 pm    Post subject: Re: Check 301 before installing

(uploaded in root)

As is

Quote:
Parse error: syntax error, unexpected T_STRING in /customers/thegame-online.dk/thegame-online.dk/httpd.www/test1.php on line 3


FALSE instead of TRUE:

Quote:
Parse error: syntax error, unexpected T_STRING in /customers/thegame-online.dk/thegame-online.dk/httpd.www/test2.php on line 3
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

Check 301 before installingPosted: Wed Jan 24, 2007 5:34 pm    Post subject: Re: Check 301 before installing

Sorry my fault , an extra ", erf.

Anyway, here is the correct one :
Code:
<?php
header("HTTP/1.1 301 Moved Permanently", TRUE, 301);
header("Location: http://www.example.com/");
exit();
?>

_________________
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


Last edited by dcz on Mon Mar 19, 2007 9:42 pm; edited 1 time in total
Back to top
Visit poster's website
euroman
PR0
PR0


Joined: 21 Oct 2006
Posts: 81

Check 301 before installingPosted: Wed Jan 24, 2007 5:42 pm    Post subject: Re: Check 301 before installing

It takes me to the index page.

When the mod is installed - none of the direct links to posts on the index page works.
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

Check 301 before installingPosted: Wed Jan 24, 2007 5:49 pm    Post subject: Re: Check 301 before installing

With the proper headers ?

If so you could just replace :

Code:
      $http = (@function_exists("getallheaders")) ? "HTTP/1.1 " : "Status: ";


with :

Code:
      $http = "HTTP/1.1 ";


in phpbb_seo/phpbb_seo_class.php, to force the use of HTTP/1.1, the one working.

For you other issue, I'm not sure, try implementing this one, and if you just want to deactivate the zero dupe all at once, you can just add :

Code:
return;


after :

Code:
   function seo_redirect($url, $header = "301 Moved Permanently", $code = 301, $replace = TRUE) {
      global $db;


still in phpbb_seo/phpbb_seo_class.php. And delete it to re-activate the redirections.

Easier to switch from on to of when testing.

++

_________________
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
euroman
PR0
PR0


Joined: 21 Oct 2006
Posts: 81

Check 301 before installingPosted: Wed Jan 24, 2007 6:16 pm    Post subject: Re: Check 301 before installing

dcz wrote:
With the proper headers ?

If so you could just replace :

Code:
      $http = (@function_exists("getallheaders")) ? "HTTP/1.1 " : "Status: ";


with :

Code:
      $http = "HTTP/1.1 ";


in phpbb_seo/phpbb_seo_class.php, to force the use of HTTP/1.1, the one working.


++


When I do the above everything works...

With regard to the cited below I dont think I understand: When you say "other issue" what do you mean, sorry?

Quote:
For you other issue, I'm not sure, try implementing this one, and if you just want to deactivate the zero dupe all at once, you can just add :

Code:
return;


after :

Code:
   function seo_redirect($url, $header = "301 Moved Permanently", $code = 301, $replace = TRUE) {
      global $db;


still in phpbb_seo/phpbb_seo_class.php. And delete it to re-activate the redirections.

Easier to switch from on to of when testing.
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

Check 301 before installingPosted: Thu Jan 25, 2007 12:11 am    Post subject: Re: Check 301 before installing

I confirm, you're running genuine HTTP 301 for all case now Very Happy


So your case was a pretty good example of the header() function behavior under different server and php setup.

That's what's making this mod a bit different than other, but, IMHO, very useful.

You're going to experience a zero duplicate phpBB forum Very Happy

++

_________________
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
euroman
PR0
PR0


Joined: 21 Oct 2006
Posts: 81

Check 301 before installingPosted: Thu Jan 25, 2007 2:24 pm    Post subject: Re: Check 301 before installing

I have just tested my site using A1 sitegenerator and I can confirm it is now 100 pct. duplicate free ! Thanks for the great mod Very Happy
Back to top
Visit poster's website
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: