I've got:
RewriteRule ^page/([^/\.]+)/?$ index.php?page=$1 [L]
Which points page/([^/\.]+)/?
to index.php?page=$1
.
When I go to page/([^/\.]+)/
, I don't want to see index.php (which is achieved from the above)
For the reverse, when I go to index.php, I want to see a visible 301 redirection to page/([^/\.]+)/
.
How do I do this without causing an infinite loop... or do I only rely on canonical tags?
Update:
I got it happening in one direction (new to old), but not the other (Old to new)
RewriteRule ^([^/\.]+)-yum/?$ yum/?x=$1 [L]
RewriteRule ^([^/\.]+)/([^/\.]+)-yum/?$ yum/?x=$2&y=$1 [L]