Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can create bulk 301 redirects with individual RewriteRule entries in .htaccess, but you cannot declare a RewriteMap there. For a very large old-to-new URL list, ask your host or administrator whether they can configure a map in the server or virtual-host configuration. If you only control .htaccess, use carefully organized rules and test them before making them permanent.

Choose the right approach for bulk 301 redirects in .htaccess

The best method depends on what configuration access you have, not on a universal maximum number of redirects. Apache’s 2.4 documentation does not specify a safe rule-count limit or a performance cutoff.

Approach Configuration access How the mappings are maintained Important consideration
Individual RewriteRule entries Can be used in .htaccess if the server permits the relevant overrides and rewrite configuration. Each old path and destination is written as a rule. Easy to review mapping by mapping, but path patterns and rule order must be correct for the directory context.
RewriteMap lookup The map must be declared in server or virtual-host configuration; it cannot be declared in .htaccess or a <Directory> block. A mapping list can be maintained separately and looked up by rules. Ask the administrator to define the map. A map configured there can be used by rewrite rules in .htaccess.

Apache states that RewriteMap “can only be declared in server or virtualhost context – not in .htaccess files or <Directory> blocks.” See the Apache HTTP Server 2.4 Per-directory Rewrites documentation. Do not paste a RewriteMap declaration into .htaccess expecting it to work.

How do I redirect multiple URLs in .htaccess?

First confirm that Apache will read the file and allow rewrite directives. Apache requires the server configuration to permit directives in .htaccess through AllowOverride; its example specifies AllowOverride FileInfo. Per-directory rewriting also requires Options FollowSymLinks or Options SymLinksIfOwnerMatch. These settings are controlled by the server configuration and may not be available to a shared-hosting account.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
  1. Back up the current file. Save a copy of the existing .htaccess so you can restore it if a rule causes an error or unexpected routing.
  2. Confirm rewrite access. Check with your administrator or hosting provider that mod_rewrite is available and the directory permits the required overrides and options. If the rules appear ignored, the server configuration or your permissions may be the cause.
  3. Inventory the mappings. Pair every old path with its intended destination. Normalize leading and trailing slashes consistently, remove duplicate old paths, and review destinations to avoid chains and cycles.
  4. Add a small batch of rules. Put them in the appropriate .htaccess file, usually before rules that route requests to an application front controller. Review existing rules before changing order; interactions depend on the full file.
  5. Test before using 301. Temporarily use a 302 redirect, then request each old URL and inspect the response status and Location destination with a request tool or browser network panel.
  6. Check edge cases. Verify that rules do not match unintended paths, form loops or chains, or change query strings unexpectedly. Then change the tested redirects to 301.
  7. Monitor and roll back if needed. Check representative destinations after deployment. If a redirect is wrong, remove or correct the rule promptly and retest; browsers may retain a cached permanent redirect.

How to write RewriteRule patterns for .htaccess

In per-directory context, Apache removes the directory prefix and the leading slash from the path before matching it against a RewriteRule pattern. For example, a rule in /app/.htaccess sees the request /app/products/widget as products/widget. Therefore, the pattern in .htaccess should not start with /.

Illustrative pattern to adapt for a file in the site root:

Rank #2
Sale
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
RewriteEngine On
RewriteRule ^old-page/?$ https://www.example.com/new-page [R=302,L]

This rule matches old-page with or without a trailing slash and sends the browser to the specified destination. Replace the example host and paths with your controlled, intended destination; the example is not a claim that a particular host has been tested. The R=302 flag makes this a temporary external redirect during testing, and L stops processing the current rule pass.

After verifying the response and destination, change R=302 to R=301. A substitution that begins with / is a root-relative URL, while an absolute URL such as the example is an external destination. RewriteBase can affect relative substitutions, but it does not affect substitutions that begin with / or an absolute URL. For rule syntax and flag behavior, consult Apache’s mod_rewrite documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

How can I redirect a list of old URLs to new URLs?

If you only have .htaccess access, write one explicit rule for each mapping and keep the rules easy to compare with your inventory. For a large list, ask an administrator whether a server- or virtual-host-level RewriteMap can be added. The decision is operational: a lookup file can be easier to maintain, but it requires configuration access that an .htaccess-only user does not have.

For either method, preserve a clear one-to-one mapping and confirm that each destination is final rather than another redirect. A source that points to a second redirect creates a chain; mappings that send requests back into one another can form a cycle. These are review checks, not a substitute for testing the actual requests against the complete configuration.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Prevent loops, unsafe destinations, and hard-to-reverse mistakes

Watch for per-directory rewrite loops

In per-directory context, [L] ends the current pass through the rules, but a substitution can cause Apache to process the rules again. Apache documents that this can create loops; in supported contexts, [END] can stop further per-directory processing. Do not replace flags blindly: test the rule sequence and patterns in the context where they run.

Keep redirect targets controlled

Do not build a redirect URL from unvalidated user input. Apache warns that an attacker may exploit an unvalidated destination to send visitors to an attacker-controlled site. Use fixed destinations from your reviewed mapping list, and validate any dynamic input before it can affect a redirect target. See Apache’s rewrite security guidance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Make permanent redirects only after verification

Apache warns that a browser is allowed to cache a 301 Moved Permanently response indefinitely. Search engines may also take days or weeks to recrawl an incorrect redirect. Test with a 302 first, verify the destination and response behavior, and only then switch to 301. Apache describes this caching caveat in its Per-directory Rewrites documentation.

Use detailed rewrite logging sparingly

If ordinary response checks do not explain the behavior, an administrator can use rewrite tracing to investigate. Keep trace-level logging temporary: Apache warns that high trace logging can slow the server and produce extensive logs. Remove or reduce it after diagnosing the issue.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.