nginx rewrite issue

okay i am having some problems with nginx write algorithm with wordpress.

i am using this for the rewrite and it works good;

server_name         www.domain.com domain.com;
    if ($host != 'domain.com') {
    rewrite ^/(.*)     http://domain.com/$1 permanent;
    }

it makes this url;

http://domain.com/?author=1

to this;

http://domain.com/author/username/

which is good but with an url like this;

http://domain.com/?author=1&type=like

it makes it;

http://domain.com/author/username/?type=like

and i am not getting any error but the query is not working.

what i am missing?

thanks.

1 Reply

okay this fixed it;

try_files $uri $uri/ /index.php?q=$uri&$args;

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct