oh! nono!
here is an example for url rewrite .htaccess file:
Options All -Indexes
IndexIgnore *
RewriteEngine On
RewriteRule ^dir\.(.*)\.html$ /YOURDIRECTORY/index.php?twg_album=$1
RewriteRule ^dir\.(.*)\.(.*)\.html$ /YOURDIRECTORY/index.php?twg_album=$1&twg_show=$2
RewriteRule ^file\.(.*)\.(.*)\.html$ /YOURDIRECTORY/image.php?twg_album=$1&twg_show=$2
When you write:
www.yoursite.com/dir.directory_20with_2 ... 0directory
you will obtain :
www.yoursite.com/YOURDIRECTORY/index.ph ... 0directory
with this variables:
twg_album = directory_20with_20spaces_2Fother_20directory
twg_show = file_20in_20the_20directory
you only must to change them with:
$_GET['twg_album']=str_replace("_","%",$_GET['twg_album']);
$_GET['twg_show']=str_replace("_","%",$_GET['twg_show']);
$_GET['twg_album']=urldecode($_GET['twg_album']);
$_GET['twg_show']=urldecode($_GET['twg_show']);
You just get the true variables and all the special characters too
to do the script for the site you only must to write the links with the rewrite style. You can do two functions to code and decode the variables to urls:
// functions to make able have special characters in the url with some help from
http://www.w3schools.com/tags/ref_urlencode.asp
function ConverT($var) {
$var = urlencode($var);
$var = str_replace(' ', '%20', $var);
$var = str_replace('+', '%20', $var);
$var = str_replace('?', '%3F', $var);
$var = str_replace('=', '%3D', $var);
$var = str_replace('@', '%40', $var);
$var = str_replace('(', '%28', $var);
$var = str_replace(')', '%29', $var);
$var = str_replace('_', '%5F', $var);
$var = str_replace('%', '_', $var);
return $var;
}
function DeConverT($var) {
$var = str_replace("_","%",$var);
$var = urldecode($var);
return $var;
}
// example of link
echo 'index.php?twg_album='.ConverT($twg_album).'&twg_show='.ConverT($twg_show);
// example decode
$_GET['twg_album'] = DeConverT($_GET['twg_album']);
$_GET['twg_show'] = DeConverT($_GET['twg_show']);
That's all folks!
i used it that to do a gallery like this but when the system goes very slow i did must to create it again in mysql
i dont worry about this with your gallery because i dont think to get 3 thousand ip visits a day with my gallery... its only for a few freaks hahahahahah and i think that you are not doing ls's with exec to show the content
)
The google sitemap. Will be extracted by the xml files (i dont know how it works) or doing a recursive ls and posting the links
but dont worry that properties are not so important for now...