I use following .htaccess-code to convert my URLs to user-friendly ones:
RewriteEngine on
RewriteRule ^(.*)/$ index.php?page=$1
Now I want to redirect requests from the www-subdomain to the rootdomain, e.g. if the user requests http://www.mydomain.com/stuff/, he gets to see http://mydomain.com/stuff/ in the address bar of his browser.
All attempts I’ve made resulted in external redirects, so the user gets to see the rewritten URL, e.g. http://mydomain.com/index.php?page=stuff.
How do I perform an internal redirect, so that the address bar doesn’t change?
Use these rules (put them into .htaccess file in root folder):
You most likely had the correct rules already (based on your description) .. you just had them in wrong order. You have to keep in mind — order matters.