A
A
Anton Shvets2018-03-22 16:23:41
Apache HTTP Server
Anton Shvets, 2018-03-22 16:23:41

How to rewrite file address from root to folder without redirect?

There is a site folder with the following structure
/api
/dist
/whatever It is
necessary that requests to /api remain unchanged
Any other requests converted from %{REQUEST_URI} to /dist/%{REQUEST_URI} in the address bar should not be visible to the dist user.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2018-03-23
@shambler81

Negative rule will help you
RewriteCond %{REQUEST_URI} ! ^/api.*

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question