Title: Rewrite Rules for Nginx
Last modified: August 21, 2016

---

# Rewrite Rules for Nginx

 *  Resolved [dealsoff](https://wordpress.org/support/users/dealsoff/)
 * (@dealsoff)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/rewrite-rules-for-nginx/)
 * Can someone tell me the rewrite rules for Nginx.
    The plugins works fine for 
   regular links but when it redirect images files it gives me a 404 error.
 * [https://wordpress.org/plugins/wp-noexternallinks/](https://wordpress.org/plugins/wp-noexternallinks/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Jehy](https://wordpress.org/support/users/jehy/)
 * (@jehy)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/rewrite-rules-for-nginx/#post-4610956)
 * Hello. For nginx, use
 * >  server
   >  { listen ***; server_name ***; root ***; index index.php;
   >  rewrite ^/goto(.*) http:/$1 permanent;
 *  [Roman Kapanets](https://wordpress.org/support/users/mauhem/)
 * (@mauhem)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/rewrite-rules-for-nginx/#post-4610974)
 * Add
 * > rewrite ^/goto/(.*) $1 permanent;
 *  in server section.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Rewrite Rules for Nginx’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-noexternallinks.svg)
 * [WP No External Links](https://wordpress.org/plugins/wp-noexternallinks/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-noexternallinks/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-noexternallinks/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-noexternallinks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-noexternallinks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-noexternallinks/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Roman Kapanets](https://wordpress.org/support/users/mauhem/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/rewrite-rules-for-nginx/#post-4610974)
 * Status: resolved