I've been trying to work out how to redirect traffic comming to my site into a new folder. Originally I had all my pages in the root directory but as I've added new domains and sub-domains to my space it's gotten a bit untidy and so i want to move my root files into a seperate foledr so that nothing gets mixed up. I've tried using an htaccess redirect: RedirectMatch permanent ^/$ http://mydomain.com/php/index.php Code (markup): but this redirects ANY traffic to the new location. What I want is a way to redirect the root traffic but leave the sub-domain traffic alone. I'm aware that I could use a META refresh to do it but that's just a bit untidy and I'm sure there must be a better way than that. Appreciate the help!
Try this: Options +FollowSymlinks RewriteEngine on RewriteCond %{HTTP_HOST} ^www.mydomain.com$ RewriteRule ^$ http://mydomain.com/php/index.php [R=301] Code (markup): Jean-Luc