Answer the question
In order to leave comments, you need to log in
How to redirect apache folder?
In the advanced template, it is necessary to put the files that will be used both on the back and on the front into a shared folder - contentRoot.
I'm trying to make a redirect for images in htaccess:
RewriteRule ^images/(.*)$ contentRoot/images/$1 [L]
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
</IfModule>
<IfModule mod_rewrite.c>
RewriteRule ^images/(.*)$ contentRoot/images/$1 [L]
RewriteCond %{REQUEST_URI} ^/(assets|css|js|images|fonts)
RewriteRule ^assets/(.*)$ frontend/web/assets/$1 [L]
RewriteRule ^css/(.*)$ frontend/web/css/$1 [L]
RewriteRule ^js/(.*)$ frontend/web/js/$1 [L]
RewriteRule ^fonts/(.*)$ /frontend/web/fonts/$1 [L]
RewriteRule ^(.*)$ frontend/web/$1 [L]
RewriteCond %{REQUEST_URI} !^/(frontend|backend)/web/(assets|css|js|fonts|images)/
RewriteCond %{REQUEST_URI} !index.php
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ frontend/web/index.php
</IfModule>
Answer the question
In order to leave comments, you need to log in
The most correct option is to use a ln
soft link.
And don't play jokes with redirects.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question