php - Google News - URLs scheme and Primary Key -


according google allow article/news appear in google news:

display three-digit number. url each article must contain unique number consisting of @ least 3 digits. example, can't crawl article url: http://www.google.com/news/article23.html. can, however, crawl article url: http://www.google.com/news/article234.html. keep in mind if number in article consists of isolated four-digit number starts 199 or 200, won't able crawl it. please note rule waived news sitemaps.

i have following url looking this:

http://www.mydomain.com/news/91/this-is-news-title 

this not accepted google because news id did not reach 119 or 200

so can done change primary key start 200? have 91 articles (from id 1 91).

is there way change newsid 1 become 200, newsid 2 become 201. need add 301 redirect old article id's new id's ?

my site developed in php , news data mysql database

for sql part, guess do:

update news_table set id=id+199 id<=91; 

however, if google has problems isolated four-digit numbers start 199 or 200, should begin at, 2101. relevant sql update clause be:

update news_table set id=id+2100 id<=91; 

and redirecting part, assuming running apache mod_rewrite, like:

rewriteengine on rewriterule ^/news/([0-9]{1})/(.*)$ http://www.mydomain.com/news/210$1/$2 [r=301, l] rewriterule ^/news/([0-9]{2})/(.*)$ http://www.mydomain.com/news/21$1/$2 [r=301, l] 

not 100% sure these. want test in development environment.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -