Originally Posted by
agribilos
Sorry for not specifying the version. I thought that they functioned the same way. I use voron's version. I actually put my 000empty.iwd and zzzmod.iwd in the maps folder. The maps folder is then linked to fs_game within apache. So when the client tries to download, the server redirects to fs_game in apache. If they don't exist there then fast download fails and goes back to slow (server) mode. But it only does this check once during my tests. So if a client connects for the first time and there is a custom map running then the map will be downloaded at slow speed and the client will probably go away. I tried to change ownership to root to prevent it from deleting and chmod 444 but it still deletes the files. Libcod is run from a normal non root account. I can't understand how it is possible to get permission to delete. I guess i will have to go with multiple copies for the moment until i find a solution.
I use something like this for my download url:
PHP Code:
<?php
if(substr($_GET["file"], 0, strlen('/JumpersHeaven')) === '/JumpersHeaven')
{
if(substr($_GET["file"], 0, strlen('/JumpersHeaven/zzz_')) === '/JumpersHeaven/zzz_' || substr($_GET["file"], 0, strlen('/JumpersHeaven/000')) === '/JumpersHeaven/000') //cod2 mod files
$url = $url . '/mods/cod2' . substr($_GET["file"], strlen('/JumpersHeaven'));
else
$url = $url . '/maps/cod2' . substr($_GET["file"], strlen('/JumpersHeaven')); //cod2 map files
}
else if(substr($_GET["file"], 0, strlen('/usermaps')) === '/usermaps') //cod4 map files
$url = $url . '/maps/cod4' . substr($_GET["file"], strlen('/usermaps'));
else if(substr($_GET["file"], 0, strlen('/mods/jh')) === '/mods/jh') //cod4 mod files
$url = $url . '/mods/cod4' . substr($_GET["file"], strlen('/mods/jh'));
else
$url = $url . $_GET["file"];
header('Location: '. $url, true, 302);
die();
?>
as "index.php", with wwwbaseurl set to "mydomain.com/index.php?file="