Good all the time of day! I can’t figure out how to load style files / scripts / images using another URL.
I have simplified everything to the horror, so that it would be easier for you to explain what my fundamental policy is about ..
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -f RewriteRule .* aaa.css [L] This code should throw aaa.css from the root instead of any requested files .. but the browser gives me 404 errors all the time.
I suspected a bunch of errors, for example, like I forgot to set AllowOverride to All. if i try to change
RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .* aaa.css [L] then the redirect works with any request not for files, but just for any URL, it throws me on aaa.css file .. i.e. It's in RewriteCond% {REQUEST_FILENAME} -f Maybe I didn’t connect something necessary for these conditions to work or I just misunderstood the whole paradigm of htaccess
Explain at least which way to dig ... Thank you in advance for all the answers. any!
RewriteRule .* aaa.css [L]hereRewriteRule .* aaa.css [L]that all requests should be processed viaaaa.cssbut you should just ignore thisaaa.cssand the server will have to give it away. Those. just rename or delete htaccess. And the question is, what kind of result is needed? - Naumovmod_rewritelogs: add the linesRewriteLog /var/log/rewrite.logandRewriteLogLevel 3to your .htaccess path to your log file - Tunker