plodos Posted October 31, 2008 Share Posted October 31, 2008 google is caching all the pages with variable names like eng.iiu.edu.my/index.php?action=Category&id=3&sub=1&showstaff=eadesta www.iiu.edu.my/resources/stafflist1.shtml?page=2&st=D&stname=&sdept= this is my paging code...its sorting the data for every 25 records. like http://www.aaa.com/xxx.php http://www.aaa.com/xxx.php?page=2 http://www.aaa.com/xxx.php?page=3 . . http://www.aaa.com/xxx.php?page=102 but problem is that google is not caching my links like http://www.aaa.com/xxx.php?page=23, 24, 25, 26, 27 .......... google just caching my link http://www.aaa.com/xxx.php What must I do for cache another links <?php function title_case($title) { //////////////////////////////// } $page = $_GET["page"]; if(empty($page) or !is_numeric($page)){ $page = 1; } $limit = 25; $satirsayisi = mysql_num_rows(mysql_query("select * from person where c_no='2' AND date < NOW() - INTERVAL 7 HOUR")); $sayfasayisi = ceil($satirsayisi / $limit); $baslangic = ($page-1)*$limit; $data = mysql_query("select * from person where c_no='2' AND date < NOW() - INTERVAL 7 HOUR ORDER BY lname ASC LIMIT $baslangic,$limit"); while($info=mysql_fetch_array($data)) { echo title_case($info['lname'])." ".title_case($info['fname']).", <br>"; } if($page > 1){ $back = $page-1; echo "<p align=\"center\"><b><a href=\"xxx.php?page=$back\"><< Back </a>"; }else{ echo "<p align=\"center\"><b> << Back "; } echo " | "; if($page>=$sayfasayisi){ echo "Next >> </b></p>"; }else{ $next = $page+1; echo "<a href=\"xxx.php?page=$next\">Next >></a></b></p>"; } ?>[code] Link to comment https://forums.phpfreaks.com/topic/130822-google-how-to-cache-the-pages-give-me-an-idea-please/ Share on other sites More sharing options...
redarrow Posted October 31, 2008 Share Posted October 31, 2008 please look up mod rewrite_url google dosent like numbers at the end off url's ......... u need to format the end off your url to get it catched......... Link to comment https://forums.phpfreaks.com/topic/130822-google-how-to-cache-the-pages-give-me-an-idea-please/#findComment-679094 Share on other sites More sharing options...
plodos Posted November 1, 2008 Author Share Posted November 1, 2008 Pretty URL: /topic-41/favourite-cheese.html Ugly URL: /viewtopic.php?t=41 .htaccess: Options +FollowSymLinks RewriteEngine On RewriteRule ^topic-([0-9]+)/[A-Z0-9_-]+\.html$ /viewtopic.php?t=$1 [NC,L] I didnt understand the " [NC,L] " ...What does it stand for ? I found this example.....I will test it now thank you redarrow Link to comment https://forums.phpfreaks.com/topic/130822-google-how-to-cache-the-pages-give-me-an-idea-please/#findComment-679964 Share on other sites More sharing options...
plodos Posted November 1, 2008 Author Share Posted November 1, 2008 .htaccess Options +FollowSymLinks RewriteEngine On RewriteRule ^topic-([0-9]+)/[A-Z0-9_-]+\.html$ /aaa.php?page=$1 [NC,L] RewriteRule ^topic-([0-9]+)/[A-Z0-9_-]+\.html$ /bbb.php?page=$1 [NC,L] RewriteRule ^topic-([0-9]+)/[A-Z0-9_-]+\.html$ /ccc.php?page=$1 [NC,L] I upload that .htaccess file to FTP. But the links are same Ugly mode like http://www.aaa.com/aaa.php?page=3 What is the problem? Link to comment https://forums.phpfreaks.com/topic/130822-google-how-to-cache-the-pages-give-me-an-idea-please/#findComment-679974 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.