Welcome! Log In Create A New Profile

Advanced

Re: Comprehensive Rewrite Rules / Regular Expressions Guide?

April 01, 2009 07:32AM
On Wed, Apr 01, 2009 at 03:50:53AM -0700, Michael Shadle wrote:

> 2009/4/1 Igor Sysoev <is@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?

rewrite ^ http://michaelshadle.com$request_uri? permanent;

slightly faster than

rewrite ^(.*) http://michaelshadle.com$1 permanent;


--
Igor Sysoev
http://sysoev.ru/en/

Subject Author Posted

Comprehensive Rewrite Rules / Regular Expressions Guide?

Ole Rehmsen April 01, 2009 06:04AM

Re: Comprehensive Rewrite Rules / Regular Expressions Guide?

Jérôme Loyet April 01, 2009 06:27AM

Re: Comprehensive Rewrite Rules / Regular Expressions Guide?

Igor Sysoev April 01, 2009 06:28AM

Re: Comprehensive Rewrite Rules / Regular Expressions Guide?

Ole Rehmsen April 01, 2009 06:56AM

Re: Comprehensive Rewrite Rules / Regular Expressions Guide?

mike April 01, 2009 06:50AM

Re: Comprehensive Rewrite Rules / Regular Expressions Guide?

Igor Sysoev April 01, 2009 07:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 108
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready