Jump to content

Google how to cache the pages ? Give me an idea please!


plodos

Recommended Posts

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]

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 :)

.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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.