It seems you only redirect /lab, but the static files are not in /lab, they are in /static.

So you should also redirect /static so that these files can be accessed.

Another way would be to just place the static files into the appropriate Apache directory.

Edit

The error message about file not found says

C:/apache24/htdocs/static/css/main.00e8fde0.css

Assuming The DocumentRoot is C:/apache24/htdocs that means the URL to access the file is /static/css/main.00e8fde0.css.

Answer from RalfFriedl on serverfault.com
🌐
Drupal
drupal.org › project › drupal › issues › 2260969
404 error on css/js aggregated files in site located in a VirtualDocumentRoot [#2260969] | Drupal.org
February 10, 2017 - The error I see in Firefox's web ... many tests and reading Apache manuals it is apparent that the {REQUEST_FILENAME} variable can't be trusted to have the expected contents when operating in a VirtualDocumentRoot....
Discussions

magento 1.9 - .js and .css files suddenly giving 404, making the entire website become without any formatting or functionality! - Magento Stack Exchange
All coming from .js and .css files. Upon clearing the var/cache folder from the command line, it worked again all on its own. However, I still can't figure out what caused the error to prevent from happening again. Apache and Magento error logs show nothing aside from the 404 for the files. More on magento.stackexchange.com
🌐 magento.stackexchange.com
April 4, 2016
apache - Why doesn't the CSS on the server error page work? - Stack Overflow
On my website, I have a custom 404 error page. On the main directory (root), the server loads up 404.html along with the linked CSS file. The problem is, that if I visit a separate directory in the... More on stackoverflow.com
🌐 stackoverflow.com
November 30, 2016
css - apache cant reach html subdirectories and getting 404 error - Stack Overflow
i have a problem with my apache server. i dont know why, but iv'e copied files from one apache server to another, same owners to the folders and same '777' chmod. but in the other server, my applic... More on stackoverflow.com
🌐 stackoverflow.com
July 10, 2017
apache - Will broken css/image link 404 errors affect server performance under load? - Stack Overflow
I have a few images and a css file on my site that don't exist on the server, so each time a visitor comes Apache throws 3 404 errors in it's log. The items are hidden on the page, so it does not ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Spiceworks Community
community.spiceworks.com › software & applications
CSS files not loading, 404 error - Software & Applications - Spiceworks Community
February 2, 2022 - My page shows up with no formatting, something is giving a 404 error for the CSS files. In the apache access logs I see this - - [02/Feb/2022:17:01:34 -0500] "GET / /login HTTP/1.1" 200 10820 "http:// / / list" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ...
🌐
Stack Overflow
stackoverflow.com › questions › 44999305 › apache-cant-reach-html-subdirectories-and-getting-404-error
css - apache cant reach html subdirectories and getting 404 error - Stack Overflow
July 10, 2017 - i have a problem with my apache server. i dont know why, but iv'e copied files from one apache server to another, same owners to the folders and same '777' chmod. but in the other server, my application is trying to use css files from /var/www/html/css folder, and Although this folder contain my files, im getting 404 error when my web app is trying to reach the files.
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › using the raspberry pi › advanced users
Cant change Apache2 default error 404 page - Raspberry Pi Forums
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L] Moved my error 404 page from /var/www/404error/ to /var/www/html/404error, because i got default error what looks like this 404 Not Found Couldn't find Error Document File. After that i tried to open a page what does not exist using http not https. Thats what i got -- Images and css files are stored in /var/www/html/404error/img or ...../www/html/404error/css When i tested this page it looked fine (loaded images, css files).
Find elsewhere
🌐
GitHub
gist.github.com › BMeu › 3a6b61fcc681c1b3e76f07473a9bb39a
Apache: passing the requested URL to a 404 error document · GitHub
But wait a minute---ErrorDocument guarantees us to set a few environment variables (REDIRECT_URL, REDIRECT_STATUS, and REDIRECT_QUERY_STRING to be exact [1]), and we can use environment variables in the rewrite module [2]! So let's combine those two: first, we will have ErrorDocument pass all 404 errors to the location of our script. This will ensure that the above mentioned environment variables will be set and any additional files used by the error page (e.g. CSS and JS) will be accessed at the script's location.
🌐
Super User
superuser.com › questions › 1453326 › can-t-access-css-files-via-xampp-localhost-setup
apache http server - Can’t access CSS files via XAMPP localhost setup - Super User
In that case the HREF should be ./style.css or just style.css ... On the page that is failing press F12 in your browser to see the developers window and look at the console tab to see if there are any errors. ... For the curl command the output was as follows : HTTP/1.1 404 Not Found Date: Thu, 27 Jun 2019 13:19:10 GMT Server: Apache/2.4.39 (Win64) OpenSSL/1.1.1c PHP/7.3.6 Vary: accept-language,accept-charset Accept-Ranges: bytes Content-Type: text/html; charset=utf-8 Content-Language: en
🌐
Eu
b247.eu.org › 2017 › 05 › how-to-prevent-404-not-found-for-css-and-javascript-map-files.html
How to prevent 404 not found for css and javascript .map files
November 24, 2019 - RewriteEngine On Options +FollowSymlinks # Prevent 404 Not Found for javascript/css source maps RewriteCond %{REQUEST_URI} (\.map)$ RewriteRule (.*) 404.map [QSA] That way, every time the Chrome Dev Tools tries to access the corresponding map file, the empty 404.map file will be provided, no more errors, no glitches in DevTools or server/app functionality.
🌐
Stack Overflow
stackoverflow.com › questions › 886959 › strange-css-apache-problem
stylesheet - Strange CSS/Apache problem - Stack Overflow
May 20, 2009 - EDIT: Looking at the access logs the GET for the CSS is actually 404-ing as the path should be reviewboard/htdocs/media/rb/css/* (although there is an alias in the HTTP.conf that I assumed dealt with this.
🌐
Stack Overflow
stackoverflow.com › questions › 54728334 › ubuntu-apache-gives-404-error-but-index-php-shows-site-css
Ubuntu Apache gives 404 error but index.php shows site css - Stack Overflow
February 17, 2019 - I am setting up an application on my ubuntu 18.04 localhost in a sub directory so the url looks like this: localhost/app-name. The problem is that I keep getting an apache 404 error. I feel like I have tried everything between my default.conf and .htaccess. On the bright side if I type /index.php it atleast gives me a 404 page error from the site itself the site css.
🌐
Growth-onomics
growth-onomics.com › growth marketing agency › how to fix 404 errors issues on your custom html/css
How to Fix 404 Errors Issues on Your Custom HTML/CSS - growth-onomics
September 9, 2025 - Add the following line to the .htaccess file to tell the server to serve your custom page when a 404 error occurs: ... Replace /not-found-page.html with the correct path to your 404 page. ... Try to access a non-existent URL on your website. Your custom 404 page should display. If it does not work, check your server settings. For example, on Apache servers, ensure that .htaccess overrides are allowed by the server configuration.
🌐
FireBear
firebearstudio.com › blog › 404-error-for-scripts-and-css-in-magento-2.html
How to Fix 404 Error for Scripts and CSS in Magento 2 | FireBear
GitHub or other sources; but after installation, 404 error occurs for scripts and CSS from http://localhost/magento2/pub/static/, you’ve come to the right place. Below, you can find the possible solution to the problem. First of all, check whether the Apache rewrite engine is on or not.