.htaccess 301 redirect with regular expressions
Fresh3 days ago
Mar 15, 202644927 viewsConfidence Score0%
0%
Problem
If I have: Can I do something like? Edit Found a solution: This actually redirects instead of rewriting. Edit 2 See @Darth Android's solution with which works just as well :)
Error Output
redirect 301 /users/foo http://www.example.com/profiles/foo redirect 301 /users/bar http://www.example.com/profiles/bar
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: .htaccess 301 redirect with regular expressions
Low Risk
Try using rewrite rules if you have apache: Note that you will need ModRewrite installed and enabled in your apache config. Pulled from here if you need a method for IIS.
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix