Generate Apache and Nginx redirect rules from old/new URL pairs.
Generate server redirect rules for Apache (.htaccess) and Nginx config files. Enter an old URL and new URL, choose a redirect type (301 permanent or 302 temporary), and get the correct server config snippet ready to copy.
The .htaccess & Nginx Redirect Generator eliminates the need to manually write and format server config syntax by instantly converting old and new URL pairs into accurate Apache or Nginx snippets. Completely free and accessible directly in the browser without requiring registration or installation, it streamlines website migrations and URL restructuring tasks. Users can toggle between 301 permanent and 302 temporary redirects to ensure correct SEO and traffic routing.
Good to know: Complex wildcard matching, regex-heavy rules, or bulk processing of thousands of URLs may require custom server-level scripting rather than a single-rule generator.
Quickly create server-ready redirect rules for Apache or Nginx by entering your old and new URL pairs.
Enter the original source URL
Input the old URL path or full address that you want to redirect from in the first field.
Input the destination target URL
Paste the new URL where you want users and search engines to be sent after the redirect.
Select your redirect status code
Choose between a 301 permanent redirect for SEO or a 302 temporary redirect based on your needs.
Choose your server configuration type
Select either the .htaccess option for Apache servers or the Nginx config format for your specific environment.
Copy the generated code snippet
Review the automatically generated rule and copy the code directly into your server configuration file.
Estimated time: PT1M
Share this tool
Beautify, minify, and validate JSON data instantly.
Encode and decode Base64 strings instantly.
Generate v4 UUIDs instantly, single or in bulk.
Explain any code in plain language — all languages supported.
Encode/decode HTML entities like < > &.
Convert Unix epoch timestamps to/from readable dates.
Convert text or Markdown to a Word .docx file with live preview, RTL, and page-setup options.
Draw a Secret Santa with exclusions and share a private reveal link for each person.
Make custom bingo cards from your own words — play, print, or share a link.
Convert images to video with the Ken Burns zoom/pan effect. Add music and export as WebM.
Load and compare multiple URLs side by side in resizable iframes.
Rank anything with quick 1-v-1 matchups → a full ordered list you can share.
Convert Markdown to a fully customized, RTL-ready PDF.
See your public IP address plus full location, ISP, ASN, timezone, coordinates, and more.