Let's say the domain for my website is [http://mywebsite.com][1] and that opens the index.php. That script gets the $page,$section,$language variables from the url. So [http://mywebsite.com/index.php?lang=en§ion=home&page=sitemap][2] opens the sitemap page in English which belongs to the "home" section. And I want that same url to be rewritten to [http://mywebsite.com/home/sitemap_en.html][3]. To achieve this, already I've put the following in the .htaccess:
RewriteCond %{REQUEST_URI} .+\/.+
RewriteRule ^(.+)\/(.+)_(mk|en|al)\.html$ index.php?lang=$3§ion=$1&page=$2 [L]
But there is a huge problem now. When I visit some url like that, the files are not found because the file style.css is in the root folder and not in [http://mywebsite.com/home/style.css][4] , and there the server is searching for it. "home" is not real folder and it doesn't exists, it's only a section. The same goes for all the jpg, png, js, gif etc. How can I redirect the pages the way I like, and the files to be found with the real paths?
p.s. Some section like [http://mywebsite.com/index.php?lang=en§ion=contact][5] don't have pages at all. They should be reached like so: [http://mywebsite.com/contact_en.html][6] I have this for them, after the previous rule: RewriteRule ^(.+)_(mk|en|al).html$ index.php?lang=$2§ion=$1