Welcome!
Log In
Create A New Profile
Home
>
Mailing Lists
>
Nginx Mailing List - English
> Topic
Advanced
Remove query string on rewrite
Previous Message
Next Message
Forum List
Message List
New Topic
Print View
celevra
August 12, 2010 02:32AM
Registered: 13 years ago
Posts: 1
Hi,
I am trying to make a 301 redirect like this:
/authors.php?name=xxx ==> /author/xxx
this config solves the problem partially -
location ~ ^/authors.php {
if ($args ~ "name=(.+)" ) {
set $arg_name $1;
rewrite ^/authors\.php "/author/$arg_name" permanent;
}
}
But the query string remains, and the final location is /author/xxx?name=xxx
How can i remove the unneeded query string?
Thank you!
Reply
Quote
RSS
Subject
Author
Posted
Remove query string on rewrite
celevra
August 12, 2010 02:32AM
Re: Remove query string on rewrite
Mikhail Mazursky
August 12, 2010 06:02AM
Re: Remove query string on rewrite
Maxim Dounin
August 12, 2010 06:08AM
Re: Remove query string on rewrite
tyanhly
February 07, 2012 08:44PM
Re: Remove query string on rewrite
tyanhly
February 07, 2012 08:54PM
Sorry, only registered users may post in this forum.
Click here to login
Online Users
Guests: 309
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018