Page 1 of 1

SEO and Google

Posted: Thu Oct 06, 2005 10:36 am
by blacksnday
I have used htaccess to convert my urls to be SEO, but it seems that Google doesnt like them.
MSN has indexed the new form, so I am trying to figure out why Google won't take it also.

The stuff in the .htaccess is

Code: Select all

RewriteEngine on
Options +FollowSymlinks
RewriteRule display/news/([0-9]+) /display.php?news=$1

ErrorDocument 401 /index.php
ErrorDocument 403 /index.php
ErrorDocument 404 /index.php
and the code to create my prev/next links is

Code: Select all

$news = $row['id'];
$max_results = 1; 

if(!isset($_GET['news'])){ 
$news = 1;
} else { 
$news = $_GET['news']; 
}

//SQL CODE STUFF HERE
$from = (($news * $max_results) - $max_results); 
$sql = mysql_query("SELECT * FROM table LIMIT $from, $max_results"); 
$total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM table"),0); 
$total_news = ceil($total_results / $max_results); 
//THEN the below makes the next/prev links

if($news > 1){ 
$prev = ($news - 1); 
echo "<center><a href=\"http://siteurl.com/display/news/$prev\"><<-Previous</a>     "; 
}

if($news < $total_news){ 
$next = ($news+ 1); 
echo "     <a href=\"http://siteurl.com/display/news/$next\">Next->></a><br />"; 
}

Posted: Thu Oct 06, 2005 4:35 pm
by Burrito
and why don't you think google has taken it?

google can take quite some time to crawl your site...give it a while.

Posted: Thu Oct 06, 2005 4:51 pm
by blacksnday
Google has been indexing my site for the past 5 months.
Google DOES have the new pages, but only the index page of the site.
It refuses to index all other pages that use the SEO.

Besides, the main point of my post was to ask about the way I am doing SEO.
was just using google as an example.
Didnt mean to confuse anyone.

I know that there are many ways that SEO can get you blacklisted from Search engines
and I was just wanting to make sure the above way i am doing it is proper enough to
be safe.

Posted: Thu Oct 06, 2005 5:00 pm
by Nathaniel
Are you overwriting the 404 header? Google won't index a 404 page, ya know... ;)

Posted: Thu Oct 06, 2005 5:14 pm
by blacksnday
Nathaniel wrote:Are you overwriting the 404 header? Google won't index a 404 page, ya know... ;)
Just what I put in the htaccess to direct to index page.
I use same ErrorDoc handler on my other site which is a blog site and
havent had any problems with Search Engines not indexing.

Posted: Thu Oct 06, 2005 5:19 pm
by Nathaniel
blacksnday wrote:
Nathaniel wrote:Are you overwriting the 404 header? Google won't index a 404 page, ya know... ;)
Just what I put in the htaccess to direct to index page.
I use same ErrorDoc handler on my other site which is a blog site and
havent had any problems with Search Engines not indexing.
Apache is sending out a 404 header when Apache directs the request to the index page. I would highly recommend putting

Code: Select all

<?PHP header("HTTP/1.1 200 OK"); ?>
in index.php, before the headers are sent.

Posted: Thu Oct 06, 2005 8:28 pm
by blacksnday
Nathaniel wrote:Apache is sending out a 404 header when Apache directs the request to the index page. I would highly recommend putting

Code: Select all

<?PHP header("HTTP/1.1 200 OK"); ?>
in index.php, before the headers are sent.
putting that in my index caused Google Sitemaps to not accept my sitemap until I removed it.

Posted: Fri Oct 07, 2005 1:30 pm
by Skara
Make the error docs go to a page that then forwards to the index page.

Code: Select all

ErrorDocument # /errors.php

Code: Select all

# /errors.php
header('Location: http://yoursite.com/index.php');

Posted: Fri Oct 07, 2005 5:09 pm
by blacksnday
Skara wrote:Make the error docs go to a page that then forwards to the index page.

Code: Select all

ErrorDocument # /errors.php

Code: Select all

# /errors.php
header('Location: http://yoursite.com/index.php');
now that you mention it... i remember most cms type systems use that method.

Thanks :)