3

I'm trying to configure nginx vhost for application and stucked.

App is in directory /site/verb

At this moment app have this kind of links and it is working:

http://example.com/verb/lt.php?some_args=some_args&some_args?some_args

What I need? I need add another link for my clients like below:

http://example.com/v/lt.php?some_args=some_args&some_args?some_args

It is only change from /verb to /v but I want to handle both (for compatibility reasons) with all arguments after .php extension. Is it possible in nginx config? (I want to avoid creating symlinks in directory).

I tried symlinks but it is not good solution.

qtop
  • 31
  • 1
  • Hi qtop. Welcome to StackOverflow. Please don't forget to read the "How to ask" https://stackoverflow.com/help/how-to-ask article that will provide you a good understanding on what to include in your posts to help us give you the best possible answer. Can you share your nginx configuration? – Esteban Garcia Apr 12 '19 at 13:31
  • Hello, Thank you for reply. Yes I can but I did thi by myself at the weekend. location /v/ { rewrite ^/v/(.*)$ /verb/$1 last; } This works fine for me :) – qtop Apr 15 '19 at 13:01
  • Please edit your question and add the full server block if possible for better readability. – Esteban Garcia Apr 15 '19 at 13:05

0 Answers0