Welcome! Log In Create A New Profile

Advanced

Redirect/Rewrite

Posted by nginx_user10 
Redirect/Rewrite
October 25, 2017 07:32AM
I am trying to redirect the page to a new location.
I am trying to go from http://localhost/page/image_archive.php?i=500
to http://localhost/gallery/500
The $query_string is causing an error. The query_string is i=500. How can I just get the number and not i=500 or whatever number.

location ~* ^/page/image_archive.php?$
{
return 302 http://127.0.0.1/gallery/$query_string;
}
Re: Redirect/Rewrite
October 25, 2017 08:35AM
FIxed. I added $arg_i instead of $query_string.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 176
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