I have a page on my site: http://example.com/sub-page
I want that page to be seen when I visit: http://example.com/
The site is a dynamic php page (laravel site) which requires the following config in nginx:
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
I tried using rewrite ^/$ /sub-page last;
in the above location block but it doesn't work as intended.
How can I accomplish this?
Самый простой и удобный способ - изменить URL страницы в Laravel. Настройка взломов в конфигурации nginx для достижения вашей цели приведет к множеству проблем в будущем.
.