SPD
04-21-2006, 07:05 PM
1. PHPSESSID and XHTML
PHP session is added to url if a browser or spiders do not support cookies.
You can easy check up it!
a. Switch off in your browser cookies.
b. Delete saved cookies
c. Check up links.
In links it will be added? PHPSESSID=xxxxxx
For solution of this problem it is necessary to add in .htaccess a following code:
php_flag session.use_cookies on
php_flag session.use_only_cookies on
php_flag session.use_trans_sid off
php_value url_rewriter.tags 0
php_value arg_separator.output &
2. If your links with ?PHPSESSID=xxxxxx or ?s=A or ?s=H or ?s=P were indexed spiders, add to index.php a following code:
$request_uri = $_SERVER['REQUEST_URI'];
if ( strstr($request_uri, "PHPSESSID") || strstr($request_uri, "?s=")) {
Header( "HTTP/1.1 404 Not Found" );
exit();
}
This code is necessary for deleting these links.
You can add this code after require_once ' init.php ';
3. All pages, receive 404 code.
200 OK
404 Not Found
Solution: Delete from index.php two lines:
// $http_status = (isset ($ _REQUEST [' httpstatus'])? intval ($ _REQUEST [' httpstatus']): 404);
// httpstatus ($http_status);
Additional Problems:
4. After deleting or moving of a link, a old link has a code 200 instead of 404 (Very important problem!!!)
5. Spiders index not existing links if in links there are conterminous parts. (Very important problem!!!)
6. Enter in a browser YourSite.com/YourDirectory/ + any not existing address. You receive 200 code instead of 404. (Very important problem!!!)
7. After registration some users cannot gain access to add links.
They can gain access only if will request the forgotten password.
PHP session is added to url if a browser or spiders do not support cookies.
You can easy check up it!
a. Switch off in your browser cookies.
b. Delete saved cookies
c. Check up links.
In links it will be added? PHPSESSID=xxxxxx
For solution of this problem it is necessary to add in .htaccess a following code:
php_flag session.use_cookies on
php_flag session.use_only_cookies on
php_flag session.use_trans_sid off
php_value url_rewriter.tags 0
php_value arg_separator.output &
2. If your links with ?PHPSESSID=xxxxxx or ?s=A or ?s=H or ?s=P were indexed spiders, add to index.php a following code:
$request_uri = $_SERVER['REQUEST_URI'];
if ( strstr($request_uri, "PHPSESSID") || strstr($request_uri, "?s=")) {
Header( "HTTP/1.1 404 Not Found" );
exit();
}
This code is necessary for deleting these links.
You can add this code after require_once ' init.php ';
3. All pages, receive 404 code.
200 OK
404 Not Found
Solution: Delete from index.php two lines:
// $http_status = (isset ($ _REQUEST [' httpstatus'])? intval ($ _REQUEST [' httpstatus']): 404);
// httpstatus ($http_status);
Additional Problems:
4. After deleting or moving of a link, a old link has a code 200 instead of 404 (Very important problem!!!)
5. Spiders index not existing links if in links there are conterminous parts. (Very important problem!!!)
6. Enter in a browser YourSite.com/YourDirectory/ + any not existing address. You receive 200 code instead of 404. (Very important problem!!!)
7. After registration some users cannot gain access to add links.
They can gain access only if will request the forgotten password.