Split PDF & Extract Pages
Split a PDF or extract only the pages you need. Remove pages, save every page as a separate PDF, or split every…
PDF toolsFree tool · Developer tools
This .htaccess redirect generator writes correct 301 or 302 redirect rules for single pages or long lists of URLs, plus force HTTPS, www and trailing slash rules, with the Nginx version alongside.
Separate the two columns with a space, tab or comma. You can paste two columns straight from Excel or Google Sheets. Lines starting with # are skipped.
# BEGIN WordPress line. WordPress rewrites everything between # BEGIN WordPress and # END WordPress, so rules placed inside that block can be lost.Everything runs in your browser. Nothing you type is sent anywhere, and it is cleared when you close this page.
Free · no sign-up · runs in your browser, nothing is uploaded
Need help fixing it?
Our developers check your site's speed, SEO and mobile experience and send you a short list of fixes. No charge, no obligation.
When you change a page address, move to a new domain or rebuild your website, the old links do not disappear. Google still has them, other sites still link to them and customers may have them bookmarked. Without a redirect, every one of those visitors lands on a “404 Not Found” page. A 301 redirect sends people and search engines to the new address and tells search engines that the move is permanent.
Download a copy of your current .htaccess file first, so you can restore it in seconds if anything goes wrong. On WordPress, paste the rules above the line # BEGIN WordPress. WordPress manages the block between # BEGIN WordPress and # END WordPress and can rewrite it when you save your permalink settings, so rules inside that block may disappear. Rules that sit above it also run before WordPress handles the request.
Nginx does not read .htaccess files. Add the Nginx lines to the server block for your site, run nginx -t to test the configuration and reload Nginx. On shared hosting with Nginx, ask your host to add them.
This .htaccess redirect generator creates the rules in your browser. Nothing you type is sent to our server.
FAQ
A 301 says the page has moved permanently, so search engines treat the new address as the main one. A 302 says the move is temporary. Use 301 for changed URLs and domain moves, and 302 for short tests or temporary pages.
Open the .htaccess file in your site's main folder (with your host's file manager or FTP) and paste the rules above the "# BEGIN WordPress" line. Keep a backup of the original file.
Restore your backup .htaccess file and the site comes back at once. Then check that your host supports mod_rewrite and that you copied the full block, including the IfModule lines.
Yes. Enter the old URL with its query, for example /product.php?id=12. The generator adds a RewriteCond for the query string and drops the old query from the new URL.
Only if your server runs Nginx instead of Apache. Many shared hosting plans run Apache or LiteSpeed, which read .htaccess. If you are unsure, ask your hosting provider.
More free tools
Split a PDF or extract only the pages you need. Remove pages, save every page as a separate PDF, or split every…
PDF toolsSee the HTTP response headers of any URL and check important security, caching and compression headers.
Website checksMake an APA title page (7th edition) for a student or professional paper and format your reference list alphabetically with a hanging…
Student toolsTell us what you want to build. You get ideas, a timeline and a clear quote, free.