Could someone please point me in the right direction.
I want to create a rewrite rule so that if a user accesses the site on www.foo.com it would request www.foo.com/foo/index.php
So basically if they come through www.foo.com all of the php pages would be forced to go through the foo php controller. However if they accessed www.foo.co.uk they wouldn't.
With the rewrite rule
www.foo.com/testpage would go to www.foo.com/foo/testpage
www.foo.com/about-us would go to www.foo.com/foo/about-us
www.foo.com/contact-us would go to www.foo.com/foo/contact-us
www.foo.co.uk/testpage would go to www.foo.co.uk/testpage
www.foo.co.uk/about-us would go to www.foo.co.uk/about-us
www.foo.co.uk/contact-us would go to www.foo.co.uk/contact-us
Of course there are more than 3 pages but the above was just to give an example. Also the url in the address bar must stay www.foo.com/testpage, www.foo.com/about-us etc not not display the middle controller
Cheers