phranque - 11:09 pm on Jul 6, 2013 (gmt 0)
I found an easy way out
not so fast, Eveline.
header("Location: http://" . $_SERVER['HTTP_HOST'] . "/subdomain/index.php");
get rid of the index.php and don't refer to or redirect to any internal urls that use index.php.
instead, use this in your .htaccess file:
then you should redirect any requests for index.php urls to the trailing slash url.
Maybe not the best solution, but it works.
i would test to insure that you don't get a chain of redirects for some requests.
all non-canonical requests should be redirected to the canonical url in one hop.