Our domain.com/app/index.php is loading domain.com/blog in an iframe.
So my redirect rules should be like;
- domain.com/ => /app/index.php - domain.com/blog(.*) => /app/index.php?(.*)
Second rule is there because if someone wants to go to blog directly, we run our app first and put the blog in iframe, and append incoming querystring to iframe src tag so that it opens not on it's homepage but on requested URL.
Problem is, since I am redirecting everything on my first rule, iframe ends up in infinite loop. It tries to putself inside another iframe within it's own iframe endlessly.
Is there a way to assign an Env var so that if redirection is made, it's not repeated ?
Or to clearly address the problem, I never want blog to open without the app. How should my htaccess be ?
ps: we want to do it on htaccess, since php+js redirections are inefficient and ugly.