htaccess :
<IfModule mod_rewrite.c>
RewriteEngine On
# Removes index.php from ExpressionEngine URLs
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
# Remove www.
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [L,R=301]
RedirectMatch 301 /page_1 http://domain.com/segment_1/page_1
RedirectMatch 301 /page_2 http://domain.com/segment_1/page_2
RedirectMatch 301 /segment_1/page_x http://domain.com/segment_1/segment_2/page_x
</IfModule>
The last redirect works but the first two don't. (Error infinite loop).
Anyone has an idea why?