動的ページのSEOは主に2つの処理方法があります。
1.静的化(本当の静的ページを生成する)
2.擬似静的化(URLを静的ページのように見せかける)
まずは静的化(PHP)を見てみよう、
方法論ですが、テンプレートを利用することで、静的ページに変換することができます。
HTMLテンプレートソース(temp.html)
this is a { file } file's templets
$title = "http://export-japan.com";
$file = "zucoco";
$fp = fopen ("temp.html","r");
$content = fread ($fp,filesize ("temp.html"));
$content = str_replace ("{file}",$file,$content);
$content = str_replace ("{title}",$title,$content);
// echo $content;
$filename = "test/test.html";
$handle = fopen ($filename,"w"); //静的ファイルを生成する
if (!is_writable ($filename)){
die ("ファイル:".$filename."書き込みができません。");
}
if (!fwrite ($handle,$content)){ //データをテンプに挿入する
die ("ファイル生成".$filename."失敗");
}
fclose ($handle);
?>

