htaccess to nginx rewrite
Maxim Dounin
mdounin at mdounin.ru
Wed Jan 21 15:29:32 MSK 2009
Hello!
On Wed, Jan 21, 2009 at 09:57:19AM +0300, Igor Sysoev wrote:
> On Tue, Jan 20, 2009 at 08:25:06PM +0100, Vahid Mirjamali wrote:
>
> > I've desperately tried to convert my htaccess to nginx but sadly I just
> > couldn't figure out how to do it. I really need help badly, I'm willing
> > to pay someone 15 dollars to just make my site work again on nginx if
> > someone can help me with that.
> >
> > Attachments:
> > http://www.ruby-forum.com/attachment/3186/htaccess.zip
>
>
> Here is sample how to convert first several rules:
[...]
> # RewriteCond %{HTTP_HOST} !^www\.pspcrazy\.com
> # RewriteRule (.*) http://www.pspcrazy.com/$1 [R=301,L]
>
> server {
> listen 80 default;
> server_name _;
>
> rewrite ^ http://www.pspcrazy.com$request_uri permnent;
- rewrite ^ http://www.pspcrazy.com$request_uri permnent;
+ rewrite ^ http://www.pspcrazy.com$request_uri? permanent;
(added '?' to avoid query string duplication, typo fixed)
Maxim Dounin
More information about the nginx
mailing list