Need some help with Nginx rewrite (redirect)

Events happening in the community are now at Drupal community events on www.drupal.org.
superfedya's picture

Hi,

I need to do 301 redirect all user registration path to custom url.
Like;
/user/register and /user/register*

to

/forum/ucp.php?mode=register

I don't understand Nginx rewrite system very well, so maybe somebody can help me?

Thanks for the great support!

Comments

The post right beneath this

bhosmer's picture

The post right beneath this one has a recent discussion on this exact topic: http://groups.drupal.org/node/298833

    location /user/register {
        return 301 /forum/ucp.php?mode=register
    }

Thanks! And for

superfedya's picture

Thanks! And for /user/register/***something else?

I'm not sure what you're

bhosmer's picture

I'm not sure what you're asking.

Try this

perusio's picture

location ^~ /user/register {
        return 301 /forum/ucp.php?mode=register;
  
}

Thanks for the great support,

superfedya's picture

Thanks for the great support, works perfectly!

Nginx

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: