Apache Setting Category

preg_match + $_server

In: Apache Useful Links, PHP

<?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;
}
?>

Options for Apache

In: Apache Setting

Source:Only the SysV init-style options are defined here. Other arguments are defined on the httpd manual page.

start
Start the Apache httpd daemon. Gives an error if it is already running. This is equivalent to apachectl -k start.
stop
Stops the Apache httpd daemon. This is equivalent to apachectl -k stop.
restart
Restarts the Apache httpd daemon. [...]

Mod Rewrite Generator

In: Apache Useful Links

Please refer to http://www.thetoptopsites.com/tools/modrgen/

mod rewrite

In: Apache Useful Links

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 [...]