.htaccess redirect loop when Redirect and RewriteRule together
snippet in htaccess

.htaccess redirect loop when Redirect and RewriteRule together

user5741

#prevent internal redirects, and prevent loop
RewriteCond %{ENV:REDIRECT_STATUS} !200
RewriteCond %{REQUEST_URI} /index.php$
RewriteCond %{QUERY_STRING} ^page=foo$
RewriteRule ^.*$ http://www.domain.com/my-pretty-url/? [R=301,L]

RewriteRule ^my-pretty-url/$ /index\.php?page=foo [L]