title: unwanted URL switch and security concern. looking for a simpler or better solution
body: <p>I couldn't do it any shorter :-/</p>
  
  <p>I'm having a problem with my php project concerning redirects and $_GET.</p>
  
  <p>I hope you will help me :)</p>
  
  <p>Lets say I have these 3 folders in the root of my Webserver.</p>
  
  <pre><code>/root
     /themes
           /page.php
     /project1
           /index.php
           /content.php
     /project2
           /index.php
           /content.php
  </code></pre>
  
  <p><code>/themes</code> contains a php file called <code>/page.php</code><br />
  <code>/page.php</code> contains a dynamic PHP/HTML structure or theme, which I can use for different content files.<br /></p>
  
  <p><code>/project1</code> and <code>/project2</code> contain mostly HTML content files which get included by <code>/page.php</code>.<br /></p>
  
  <p><code>/project1</code> and <code>/project2</code> are the root folders for 2 different domains, so each contains an <code>index.php</code>.</p>
  
  <p><b>Now the problem:</b><br />
  In order to get the websites for each domain to work I have to redirect the user to <code>/themes/page.php</code>, because thats where the functionality is and then include the correct content files.<br />
  To let <code>/page.php</code> know what content file out of <code>/project1</code> or <code>/project2</code> it has to load I use a redirect for <code>index.php</code> to fill <code>$_GET</code> ,like this :</p>
  
  <pre><code>header("Location: root-domain/themes/page.php?path=project1&amp;file=content1");
  </code></pre>
  
  <p>That way page.php gets to know the path and filename of the requested file, by taking it from GET.</p>
  
  <p><b>BUT:</b><br />
  That way the user gets to know each folder and each filename, even of some php files. I don't know if that's good?<br />
  And the URL changes from the requested URL into the URL of my webserver root.</p>
  
  <p>Does one know a better solution?</p>
  
  <p>Thanks! &lt;3</p>