title: .htaccess redirection with multiple subdomain/folder
body: <p>I have three folders : the base (root like www) and 2 folders :pro / perso.</p>
  <p>I have 2 subdomains : pro.mysite.com and perso.mysite.com</p>
  <p>I want only one .htaccess, on root and i want to create redirection for both subdomains/folders.</p>
  <p>Like if i write mysite.com/Pro/index.php?p=cake i want to be redirected on pro.mysite.com/cake</p>
  <p>mysite.com/Pro to pro.mysite.com is OKAY by the hosting tools.</p>
  <p>For the pages, i have big issues. Here's my htaccess :</p>
  <pre><code>Options +FollowSymlinks
  RewriteEngine On
  RewriteBase /
  
  RewriteRule /?Pro/cake /Pro/index.php?p=cake [L]
  
  RewriteRule /?Perso/kitten /Perso/index.php?p=kitten[L]
  
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^ / [L,R=301]
  </code></pre>
  <p>Actually its work but... Without knowing why, it removes my &quot;index.php&quot;, if i go on : perso.mysite.com/kitten im redirected on : perso.mysite.com/?p=kitten</p>
  <p>Here's my actual.htaccess :</p>
  <pre><code>Options +FollowSymlinks
  RewriteEngine On
  RewriteBase /
  
  Rewritecond %{HTTP_HOST} !^www\.example\.com
  RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
  
  RewriteRule /?Pro/revue-presse-articles-sport-coach-alsace /Pro/index.php?p=presse [L]
  RewriteRule /?Pro/cachier-des-charges-sport-entreprise-coaching /Pro/index.php?p=cahierCharges [L]
  RewriteRule /?Pro/offre-coaching-sport-entreprise-alsace /Pro/index.php?p=offres [L]
  RewriteRule /?Pro/contact-entreprise-pro-coaching-sportif-coach-sport-alsace /Pro/index.php?p=contact [L]
  RewriteRule /?Pro/temoignages-coaching-entreprise-coach-societe-sport-alsace /Pro/index.php?p=temoignages [L]
  RewriteRule /?Pro/activites-sportives-entreprise-pro-coaching-sportif /Pro/index.php?p=activites [L]
  RewriteRule /?Pro/coaching-sport-entreprise-pro-coach-sportif-alsace /Pro/index.php?p=presentation [L]
  
  RewriteRule /?Particulier/coaching-activites-sportives-particuliers /Particulier/index.php?p=activites [L]
  RewriteRule /?Particulier/concept-coach-coaching-individuel-collectif-domicile /Particulier/index.php?p=concept [L]
  RewriteRule /?Particulier/studio-sport-sante-alsace-apas /Particulier/index.php?p=studioSante [L]
  RewriteRule /?Particulier/equipe-staff-membres /Particulier/index.php?p=equipe [L]
  RewriteRule /?Particulier/cachier-des-charges-sport-particuliers-domicile-coaching /Particulier/index.php?p=cahierCharges [L]
  RewriteRule /?Particulier/coaching-sportif-domicile-alsace-bas-rhin-haut-rhin-strasbourg /Particulier/index.php?p=couvertureGeo [L]
  RewriteRule /?Particulier/offre-coaching-sport-domicile-alsace /Particulier/index.php?p=offre [L]
  RewriteRule /?Particulier/tarifs-prix-offres-coaching-sportifs-sport-alsace /Particulier/index.php?p=tarifs [L]
  RewriteRule /?Particulier/contact-coaching-sportif-domicile-coach-sport-alsace /Particulier/index.php?p=contact [L]
  RewriteRule /?Particulier/temoignages-coaching-domicile-coach-sport-alsace /Particulier/index.php?p=temoignages [L]
  RewriteRule /?Particulier/coaching-sport-domicile-coach-sportif-alsace /Particulier/index.php?p=presentation [L]
  RewriteRule /?Particulier/nos-coachs-sportifs-domicile-coach-alsace /Particulier/index.php?p=coachs [L]
  
  ErrorDocument 404 https://www.example.com
  
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^ / [L,R=301]
  </code></pre>
  <p>So, if we take the first one, actually if i go on : pro.example.com/revue-presse-articles-sport-coach-alsace it redirect me on pro.example.com/?p=presse</p>
  <p>My only wish is to be redirected on :</p>
  <ul>
  <li>pro.example.com/revue-presse-articles-sport-coach-alsace (without seeing the true page index.php?blabla etc)</li>
  <li>or pro.example.com/index.php?p=presse</li>
  </ul>