After looking for a solution for days I see no other option than to present this whole case. I have a site that includes the text content via an array that depends to a query string on the URL.
The site structure is this
The index file looks somewhat like this:
// includes the text content from the php-files in the companies-
// directory which are arrays
// which contains
$company = $_GET['visitor'];
// to get the contents dynamically depending on which url is used
// In the <body> I get larger parts of the site as includes from the
// includes-directory like
<?php include('./includes/section-anschreiben.php'); ?>
// and the text contents from the files in the companies-directory
// are pulled in like this
<?php echo $companies[$company]["job"]; ?>
This works just fine as long as I use the query-string:
By setting a rewrite rule I want to provide a clean URL like
RewriteRule \.(css|jpe?g|gif|png|js|ico|woff|woff2)$ - [L]
RewriteRule ^(.+)$ site/index.php?visitor=$1 [L]
I then had the problem that all CSS and Images were lost. After researching I set htaccess to ignore asset files by adding
<base href="http://localhost/site-bewerbung/site/"> in the html and
./ for CSS and all includes.
Now the site is coming back together. The assets load but now the Query-string seems to have no effect anymore. All the text content from the companies/*.php are gone and I'm completely stuck.
Thanks for your advice!