C
C
cybernoob2018-02-09 14:52:23
linux
cybernoob, 2018-02-09 14:52:23

How to overcome apache redirect?

There is such an alias in the apache config:

Alias "/admin" "/home/user/web/site.ru/public_html/fold/web"

He works.
But if you type, for example /admin/something, then the request no longer goes to fold/web, but to the default folder.
How to make an alias so that if:
Path = /admin
Or any path starting with a directory /admin/***
then this redirection condition to fold/web
was met Probably AliasMatch is needed here, but I don’t understand how to write it yet. Tried:
AliasMatch "^/admin(.*)" "/home/user/web/site.ru/public_html/fold/web"

But there is an endless redirect and redirects to the page
site.ru/admin/something/index.html/index.html/index.html/index.html/index.html/

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question