A
A
Andr'U Sender2015-04-22 07:31:57
htaccess
Andr'U Sender, 2015-04-22 07:31:57

.htaccess Accessing a virtual directory and returning files from a real one?

The question is actually this:
Is there a file structure

  • assets/app/name/
  • assets/app/name2/
  • assets/app/name3/

And calls of the form:
assets/FILENAME, and
so it is necessary that when accessing assets/FILENAME it returns, for example, assets/app/name/FILENAME

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PO6OT, 2015-04-22
@AndruSender

write in .htaccess: RewriteRule ^/assets/(.*)$ /assets/app/name/$1 [L]
and if there are no following lines, then write before the above line:

RewriteEngine On
RewriteBase /

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question