web dictionary for beginners
<?php
$geturl=$_SERVER['HTTP_HOST'];
if(preg_match(”/xxx.com/i”, $geturl))
{
$geturl=preg_replace(’#aaa.com#is’,”,$geturl);
?>
<meta http-equiv=’refresh’ content=’0; url=<?php echo $geturl;?>’>
< ?php
exit;
}
?>
Please refer to http://www.thetoptopsites.com/tools/modrgen/
mod_rewrite is just possibly one of the most useful Apache modules and features. The ability to rewrite requests internally as well as externally is extremely powerful.
.htaccess rewrite examples should begin with:
Require the www
Require no www
Check for a key in QUERY_STRING
Removes the QUERY_STRING from the URL
Fix for infinite loops
Redirect .php files to .html files (SEO [...]