How to redirect a folder on apache?

0 like 0 dislike
6 views
In the advanced template files that will be used on the back and on the front put in a shared folder contentRoot
Try in. htaccess to do a redirect for images:
RewriteRule ^images/(.*)$ contentRoot/images/$1 [L]

Full code:
Options +FollowSymlinks RewriteEngine On 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 

Please tell me what is the error?
by | 6 views

1 Answer

0 like 0 dislike
The best option is to use a ln soft link.
And not to write the jokes with the redirects.
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
28,643 users