Here’s the issue:
Right now users can browse my site via either “http://.com” or
“http://.com.”. Notice the trailing dot. So because of some
flash security issues I want to redirect the hostname with the trailing
dot to my regular hostname. Should be easy, right?
I’ve tried a bunch of things, and it appears that $host doesn’t include
the trailing dot. But if it doesn’t, does anything?
if ($host ~ "<host_name>.com\." ){
rewrite ^(.*) http://<%= http_host_name %>$1 permanent;
}
I’ve also tried
if ($host ~ "\.$" ){
rewrite ^(.*) http://<%= http_host_name %>$1 permanent;
}
And a number of other things. Any ideas would be greatly appreciated!