Forum Moderators: coopster
if (preg_match('/[A-Z]/', $_SERVER['REQUEST_URI']))
{
$lowercase_file_url = strtolower("http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
header("HTTP/1.1 301 Moved Permanently");
header("Location: $lowercase_file_url");
exit();
} $_SERVER['HTTP_HOST'] here. Hard code the domain name. <VirtualHost 127.0.0.1:80>
ServerName example.com:80
RedirectMatch permanent (.*) http://www.example.com$1
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost 127.0.0.1:443>
ServerName example.com:443
SSLEngine on
SSLVerifyClient none
SSLCertificateFile /path/to/server.crt
# required on Windows ...
#SSLCertificateKeyFile /path/to/server.key
RedirectMatch permanent (.*) [example.com$1...]
</VirtualHost>
</IfModule>