November 28, 2012 07:34AM
On Wed, Nov 28, 2012 at 2:25 PM, Edho Arief <edho@myconan.net> wrote:

> On Wed, Nov 28, 2012 at 7:11 PM, Cristian Rusu <crirus@gmail.com> wrote:
> > Excellent, it worked
> >
> > I have another urgent matter on a server live we just switched to
> >
> > I need that links like this:
> > http://www.example.com/?v=JYH253CT
> >
> > to be rewritten as http://www.example.com/v.php?dl=JYH253CT
> >
> >
> > Please help, server is down :(
> >
>
> http://nginx.org/en/docs/http/ngx_http_core_module.html#variables
>
> Maybe something like this.
>
> location = / {
> if ($arg_v) {
> rewrite ^ /v.php?dl=$arg_v;
> }
> }
>

I tried this from a htaccess to nginx converter

if ($query_string ~ "^v=(.*)$"){
rewrite ^/index\.php$ /v.php?dl=$1 break;
}

But the resulting url is /v.php?dl=%1&v=FER34S

beats me!!
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Rewrite all directory URLs with certain exceptions

crirus November 28, 2012 03:06AM

Re: Rewrite all directory URLs with certain exceptions

Edho Arief November 28, 2012 03:08AM

Re: Rewrite all directory URLs with certain exceptions

Maxim Dounin November 28, 2012 03:32AM

Re: Rewrite all directory URLs with certain exceptions

crirus November 28, 2012 07:12AM

Re: Rewrite all directory URLs with certain exceptions

Edho Arief November 28, 2012 07:26AM

Re: Rewrite all directory URLs with certain exceptions

crirus November 28, 2012 07:34AM

Re: Rewrite all directory URLs with certain exceptions

Antonio P.P. Almeida November 28, 2012 08:00AM

Re: Rewrite all directory URLs with certain exceptions

crirus November 28, 2012 08:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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