Comprehensive Rewrite Rules / Regular Expressions Guide?
Michael Shadle
mike503 at gmail.com
Wed Apr 1 14:50:53 MSD 2009
2009/4/1 Igor Sysoev <is at rambler-co.ru>:
> No.
>
> server {
> server_name www.example.de;
> ...
> }
>
> server {
> server_name _; # any names
>
> rewrite ^ http://www.example.de$request_uri? permanent;
> }
What about this?
server {
listen 80;
server_name michaelshadle.com;
index index.php index.html;
... etc ...
}
server {
listen 80;
server_name www.michaelshadle.com;
rewrite ^(.*) http://michaelshadle.com$1 permanent;
}
Any better?
Any worse?
More information about the nginx
mailing list