could somebody convert this .htaccess to NGINX rewrite,,?

Gabriel Evans me at gabevans.com
Mon Apr 12 10:07:24 MSD 2010


Also, see
http://b.lesseverything.com/2008/4/9/redirect-from-www-to-non-www-using-nginxfor
a configuration snippet. It's important to use a 301 redirect, for SEO
purposes.

-- 
Gabriel Evans
http://gabevans.com/

On Sun, Apr 11, 2010 at 10:49 PM, lhmwzy <lhmwzy at gmail.com> wrote:

> if($host ~* ^www.(.+)$)
> {
>    set $sub_name $1;
>    rewrite ^ http://$1$request_uri
> }
>
> right?
>
> 2010/4/12 escavern <nginx-forum at nginx.us>:
> > could somebody convert this .htaccess to NGINX rewrite,,??
> >
> > RewriteEngine on
> > RewriteCond %{HTTP_HOST} ^www\.(.+)$
> > RewriteRule ^(.*)$ http://%1/$1
> >
> > i u could,, u're the best !
> >
> > Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,73989,73989#msg-73989
> >
> >
> > _______________________________________________
> > nginx mailing list
> > nginx at nginx.org
> > http://nginx.org/mailman/listinfo/nginx
> >
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20100411/dc488535/attachment.html>


More information about the nginx mailing list