Search

Programming
Programming

We provide developers and engineers the guides and tutorials they...

Content
Content

Content is king. It's not just about how you're going to write, b...

Events
Events

Looking for an engaging connection with thousands of other people...

All tools
SEO & servers

.htaccess to nginx Redirect Converter

Convert Apache Redirect, RedirectMatch, and common RewriteRule / RewriteCond lines into nginx rewrite or return directives.

Examples

  • 301 path.
  • Force HTTPS.
  • Strip www.

How it works

Apache and nginx express redirects differently. Redirect and RedirectMatch become rewrite ... permanent|redirect. RewriteRule flags R, L, NC, and QSA are mapped where nginx has an equivalent. RewriteCond is supported for HTTPS and HTTP_HOST. Anything else is listed as skipped so you can finish it by hand.

Related tools

Related reading

Your experience on this site will be improved by allowing cookies Cookie Policy