Need some help with Nginx rewrite (redirect)

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by superfedya on May 17, 2013 at 3:41am

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

Posted by bhosmer on May 17, 2013 at 10:26am

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

Posted by superfedya on May 17, 2013 at 3:10pm

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

I'm not sure what you're

Posted by bhosmer on May 17, 2013 at 4:44pm

I'm not sure what you're asking.

Try this

Posted by perusio on May 17, 2013 at 4:56pm
location ^~ /user/register {
return 301 /forum/ucp.php?mode=register;

}

Thanks for the great support,

Posted by superfedya on May 17, 2013 at 8:12pm

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:

AltStyle によって変換されたページ (->オリジナル) /