R
R
rinaz222020-10-21 13:04:25
htaccess
rinaz22, 2020-10-21 13:04:25

Why doesn't it work when I change the url to something else?

Hello! I want to change the URL so that the browser has /site1/lp-admin/ and actually downloads /files/site1/lp-admin/
site1 from here - it can be anything (site2, habr, test123, etc.).
Did it like this:

RewriteRule ^/files/([A-z0-9]{3,20})/lp/admin/$ /$1/lp-admin/ [L] # или вместо [L] -> [QSA]

Doesn't work, displays a 404 error.
Where is the error here? Can you please advise?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2020-10-21
@dodo512

in the browser was /site1/lp-admin/ but actually downloaded from here /files/site1/lp-admin/

RewriteRule ^([^/]+/lp-admin/.*)$ /files/$1 [L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question