I am getting a "webpage has a redirect loop" error on my rewrite rules in Apache.
I want to have clean URLs for GET requests so if a user types www.flavor.com/vanilla that the server runs www.flavor.com/?s=vanilla but the url reads just www.flavor.com/vanilla so I added this:
RewriteRule ^([a-z]+)$ /?s=$1
This works fine, but I also want to have www.flavor.com/?s=vanilla to redirect to www.flavor.com/vanilla so I added this which is causing a loop.
RewriteCond %{QUERY_STRING} ^s=([a-z]+)$
#RewriteRule ^(.*)$ /%1? [L,R=301]
I tried adding [END] and [L] to the both, but no help. I've rewritten this 200 times and can't figure it out.