Answer the question
In order to leave comments, you need to log in
How to change image upload path using htaccess?
Hello. There is a normal html code and a picture.
This html file is located in the root (index.html). The img folder is here: files/img/ (i.e. 1 deeper than indicated in the code). Of course, the picture will not load, because. its full path is files/img/bg.jpg
Question: Is it possible to change the path using htaccess or make a request to the files folder and upload an image from there. As a result, it should look like the image is loaded from the img root folder.
I tried doing this, but it didn't help:
<img src="img/bg.jpg" alt="">
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* files/ [L]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question