title: direct routing to TYPO3 extension files
body: <p>I am a maintainer of the TYPO3 extension QFQ.</p>
  <p>Our extension accesses many of its files directly by links relative to <code>index.php</code> of TYPO3. For example it requests the following API file via JavaScript in the frontend:</p>
  <pre><code>/typo3conf/ext/qfq/Classes/Api/file.php
  </code></pre>
  <p>Since the upgrade to spoken URLs with TYPO3 v9 these relative paths stopped working. For example the above relative path would result in the following url when clicked on in the browser:</p>
  <pre><code>example.com/en/.../typo3conf/ext/qfq/Classes/Api/file.php
  </code></pre>
  <p>instead of:</p>
  <pre><code>example.com/typo3conf/ext/qfq/Classes/Api/file.php
  </code></pre>
  <p>We have seen that one can add static routes to single files in the TYPO3 backend (Sites &gt; Edit &gt; Static Routes &gt; Create new) but this does not seem to allow us to set the whole extension directory <code>/typo3conf/ext/qfq</code> as a static route. Since many files are accessed this way, it is way too tedious to set a static route for every single fie on every installation of TYPO3 which uses our extension.</p>
  <p>Our own &quot;dirty&quot; solution to this problem would be to add a new rewrite rule to the .htaccess which rewrites any url containing <code>typo3conf/ext/qfq</code>. It would remove any path before typo3conf.</p>
  <p>My question is: Is there a better way to solve this problem? How do other extensions create links directly pointing to the files inside the extension directory? Are we missing something obvious?</p>