I’m getting a redirect loop with the following code. How can I fix it?
- first part redirects /links.php to /linked
- second part rewrites /linked to /links.php
RewriteBase /domain.com
RewriteRule ^links\.php$ linked? [NS,R=301,L]
RewriteRule ^linked$ links.php?redirect=no [NS]
Both ways are working so I’m accepting the first one to post. Thank you again!
You need to check for the query string that you added in the second rule, so add a RewriteCond in front of the first rule: