0

I am very new to nginx. So, need help.

I want nginx rule for any url like http://example.com/abcDEF i.e. any word after domain name should be considered as parameter to home page and thus redirect to http://example.com/home?p1=abcDEF, making get request to home page. Also, to note that rest all should work as it is. i.e. http://example.com/login url should go to login page.

Lorem ipsum
  • 852
  • 3
  • 13
ghetal
  • 101
  • How do you know which URL paths should be redirected and which should not be? Also keep in mind that as a general rule the web server should not do this sort of redirect; rather, your application's router should handle it. – Michael Hampton Sep 18 '20 at 04:46
  • I am new to this... so actually I want all - http://example.com/abcDEF such urls should go to home page and on page load should perform some check to know which urls to redirect and which to not. what do you mean by application router? – ghetal Sep 19 '20 at 05:05
  • The router is code in your web application which decides what code will be called depending on the URL and possibly other criteria. Most web app frameworks provide one. – Michael Hampton Sep 19 '20 at 16:17
  • Thanks for the information. I understood. – ghetal Sep 20 '20 at 17:56

0 Answers0