![]() ![]() While Nginx rewrite rules do similar things to Apache, there are still many differences in how you write Nginx rewrite rules. php on the original url, it will only show the. Note that here, the extension from the original URL will be replaced with. * $ – Indicates the extension in the original URL.the rewritten URI) and look for a new location for any further Rewrite directives. last – This flag is ensured to stop looking for the Rewrite directive at the current location or block and use the modified URI (i.e. ![]() So $ 2 in ( w +), so any word that comes after / andreyex / in the original url. Likewise, $ 2 will replace is within 2 brackets () in reg-exe.The $ 1 in the replacement string will replace what is inside the 1st parenthesis () in reg-exe.$ 1 and $ 2 will capture the corresponding strings from the original url that do not change.In this example, when you call the original url with test.php from the browser, it will be rewritten based on the above rewrite rule and will point to the test.html page from / data / distro / linux /.url / data / distro / andreyex / test.php will be rewritten as url / data / distro / linux / test.html.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |