Answer the question
In order to leave comments, you need to log in
How to change the name of a directory / file on the server when requested?
Good afternoon, I don't know if nginx has such a feature? Example:
a directory on the server site.ru/cp/admin.php, so that the browser actually displays site.ru/cp/panel (rough example).
And for example, the get request site.ru/index?id=1 was, for example, site.ru/index.php/1
It seems to be called rewrite or something like that
Answer the question
In order to leave comments, you need to log in
for apache it is called mod_rewrite, for nginx another directive is used (too lazy to search, google).
on the site.ru/cp/admin.php server so that the browser actually displays site.ru/cp/panel (rough example).To do this, you still need to process it with a script, or write separate rules for the server for each sneeze. That is, either a single entry point and a router, or strict rules in the server config.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question