Today I changed my gtranslate config with adding this code. But now I detect that some URLs language from my website have go to 302 error:
http://www.nudos.org/sw/
http://www.nudos.org/tl/
http://www.nudos.org/et/
http://www.nudos.org/th/
http://www.nudos.org/mt/
And much more...
Many thanks for your support.
- Code: Select all
define('MAINLANG', 'en');
if(rand() % 20 == 0) {
// purge expired cache
$cached_files = array_diff(scandir('cache'), array('.', '..'));
$now = strtotime('now');
foreach($cached_files as $cached_file)
if($now - filemtime('cache/'.$cached_file) > 1.5 * CACHETIME)
unlink('cache/'.$cached_file);
}