A basic Apache redirect snippet for one moved URL. Back up .htaccess before editing production rules.
.htaccess snippet
RewriteEngine On Redirect 301 /old-page /new-page
How to use this example
- Put redirect rules before broad application rewrites when needed.
- Test the old URL with curl -I.
- Keep a backup of the previous .htaccess file.
Notes
- Incorrect rules can cause redirect loops or 500 errors.
- Use 302 while testing uncertain behavior.
Related tools and fixes
Last updated: May 18, 2026