Knowledge

Rewrite engine

Source 📝

47: 318: 471:-based system. This is not strictly URL rewriting since there is no script to 'rewrite' to, nor even a directory structure; but it provides the full flexibility of URL rewriting. 273:
which also allows the user to change the URL to see all postings available in December, simply by removing the text encoding the day '19', as though navigating "up" a directory:
412:
may hinder the construction of custom queries due to the lack of named variables. For example, it may be difficult to determine the date from the following format:
400:
The site can continue to use the same URLs even if the underlying technology used to serve them is changed (for example, switching to a new
361: 130: 283:
as a search term. This would allow users to search directly from their browser. For example, the URL as entered into the browser's
567: 328: 111: 68: 61: 83: 440: 597: 474: 90: 383: 176: 97: 697: 343: 35: 418:
In this case, the original query string was more useful, since the query variables indicated month and day:
339: 57: 79: 464: 199:) are used to provide shorter and more relevant-looking links to web pages. The technique adds a layer of 537: 394: 196: 756: 551: 543: 587: 488: 477: 203:
between the files used to generate a web page and the URL that is presented to the outside world.
630: 582: 524: 468: 433: 234: 408:
There can, however be drawbacks as well; if a user wants to modify a URL to retrieve new data,
686: 642: 222: 104: 607: 455:
has extendable URL rewriting via the OCPsoft URLRewriteFilter and Tuckey UrlRewriteFilter.
452: 230: 168: 144: 708: 429:
Many web frameworks include URL rewriting, either directly or through extension modules.
390: 216: 31: 30:
This article is about URL rewriting. For rewrite engines in mathematics and logic, see
509:
has a rewrite module. For example, a multi-link multi-variable page generation from a
826: 458: 446: 401: 378:
The links are "cleaner" and more descriptive, improving their "friendliness" to both
280: 159:(Uniform Resource Locators), modifying their appearance. This modification is called 832: 555: 298: 284: 226: 212: 625:
Many of these only apply to HTTP servers whose default behavior is to map URLs to
817: 720: 494: 484: 200: 164: 46: 629:
entities (i.e. files and directories); certain environments, such as many HTTP
626: 172: 781: 665: 17: 602: 577: 379: 294: 152: 653: 572: 514: 500: 264:
http://www.example.com/Blog/Posts.php?Year=2006&Month=12&Day=19
757:"A dynamic web-site written wholly in nginx.conf? Introducing mdoc.su!" 529: 421:
http://www.example.com/Blog/Posts.php?Year=06&Month=04&Day=02
346:. Statements consisting only of original research should be removed. 461:
has simplified URL rewriting via the PrettyFaces: URLRewriteFilter.
506: 793: 592: 258: 238: 156: 546:
supports regular expressions of URL rewriting and redirections.
554:
perspective, URL rewriting can aid in code modularization and
510: 311: 40: 733: 229:
parameters. These are often rewritten to resemble URLs for
558:, making it a useful feature of modern web frameworks. 335: 261:
might have a URL that encodes the dates of each entry:
225:
can use URLs that generate pages from the server using
279:
A site can pass specialized terms from the URL to its
436:
has URL rewriting provided by the mod_rewrite module.
480:
has had integrated functionality since version 1.5.
374:There are several benefits to using URL rewriting: 519:is possible, where multiple individual parts like 723:. Redmine.lighttpd.net. Retrieved on 2013-09-08. 248:http://example.com/search/?title=Rewrite_engine 782:URL TOOLKIT part of Hiawatha webserver's manual 540:has a URL Toolkit which supports URL rewriting. 304:http://example.com/search.php?q=search%20term 8: 755:Murenin, Constantine A. (18 February 2013). 439:URL Rewrite is available as an extension to 171:. The engine is typically a component of a 362:Learn how and when to remove this message 131:Learn how and when to remove this message 721:Docs ModRewrite - Lighttpd - lighty labs 709:Guides - Mojolicious guide to the galaxy 270:http://www.example.com/Blog/2006/12/19/ 711:. Mojolicious. Retrieved on 2013-09-08. 654:URL Rewrite extension for Microsoft IIS 618: 449:has built-in URL rewriting via Routes. 415:http://www.example.com/Blog/06/04/02/ 151:is a software component that performs 67:Please improve this article by adding 276:http://www.example.com/Blog/2006/12/ 179:. Rewritten URLs (sometimes known as 27:Web server component for mapping URLs 7: 301:. The server could rewrite this to: 734:"ngx_http_rewrite_module - rewrite" 666:"Rails Routing from the Outside In" 297:by the browser before it makes the 254:http://example.com/Rewrite_engine 25: 633:platforms, make this irrelevant. 316: 45: 568:Application Delivery Controller 290:http://example.com/search term 523:get expanded with the help of 483:Many Perl frameworks, such as 163:. It is a way of implementing 1: 267:It can be altered like this: 69:secondary or tertiary sources 237:. For example, the URL to a 598:Internet Information Server 497:has URL rewriting provided. 342:the claims made and adding 191:, search engine friendly - 849: 527:into variables to signify 210: 29: 698:clean urls in Stripes 1.5 643:mod_rewrite documentation 503:has a mod_rewrite module. 251:but can be rewritten as: 177:web application framework 573:aiScaler Traffic Manager 516:/f101,n61,o56,d/ifconfig 389:They prevent undesired " 308:Benefits and drawbacks 235:subdirectory hierarchy 56:relies excessively on 34:. For other uses, see 552:software development 544:Cherokee HTTP server 538:Hiawatha HTTP server 491:, have this feature. 167:or routing within a 588:Content negotiation 525:regular expressions 469:regular-expressions 393:", which can waste 818:Apache mod_rewrite 631:application server 583:Apache HTTP Server 434:Apache HTTP Server 327:possibly contains 478:Stripes Framework 372: 371: 364: 329:original research 233:on a site with a 141: 140: 133: 115: 16:(Redirected from 840: 806: 805: 803: 801: 790: 784: 779: 773: 772: 770: 768: 752: 746: 745: 743: 741: 730: 724: 718: 712: 706: 700: 695: 689: 684: 678: 677: 675: 673: 668:. "Ruby on Rails 662: 656: 651: 645: 640: 634: 623: 533: 522: 517: 367: 360: 356: 353: 347: 344:inline citations 320: 319: 312: 241:page with title 145:web applications 136: 129: 125: 122: 116: 114: 80:"Rewrite engine" 73: 49: 41: 21: 848: 847: 843: 842: 841: 839: 838: 837: 823: 822: 814: 809: 799: 797: 792: 791: 787: 780: 776: 766: 764: 761:nginx@nginx.org 754: 753: 749: 739: 737: 732: 731: 727: 719: 715: 707: 703: 696: 692: 685: 681: 671: 669: 664: 663: 659: 652: 648: 641: 637: 624: 620: 616: 608:Zeus Web Server 564: 528: 520: 515: 453:Jakarta Servlet 427: 422: 416: 402:blogging engine 368: 357: 351: 348: 333: 321: 317: 310: 305: 291: 277: 271: 265: 255: 249: 223:dynamic content 221:Web sites with 219: 209: 169:web application 137: 126: 120: 117: 74: 72: 66: 62:primary sources 50: 39: 28: 23: 22: 15: 12: 11: 5: 846: 844: 836: 835: 825: 824: 821: 820: 813: 812:External links 810: 808: 807: 785: 774: 763:(Mailing list) 747: 725: 713: 701: 690: 687:Django URLconf 679: 657: 646: 635: 617: 615: 612: 611: 610: 605: 600: 595: 590: 585: 580: 575: 570: 563: 560: 548: 547: 541: 535: 504: 498: 492: 481: 472: 462: 456: 450: 444: 437: 426: 425:Web frameworks 423: 420: 414: 406: 405: 398: 391:inline linking 387: 384:search engines 370: 369: 324: 322: 315: 309: 306: 303: 289: 275: 269: 263: 253: 247: 243:Rewrite_engine 217:URL shortening 208: 205: 149:rewrite engine 139: 138: 53: 51: 44: 32:Rewrite system 26: 24: 14: 13: 10: 9: 6: 4: 3: 2: 845: 834: 831: 830: 828: 819: 816: 815: 811: 795: 789: 786: 783: 778: 775: 762: 758: 751: 748: 735: 729: 726: 722: 717: 714: 710: 705: 702: 699: 694: 691: 688: 683: 680: 667: 661: 658: 655: 650: 647: 644: 639: 636: 632: 628: 622: 619: 613: 609: 606: 604: 601: 599: 596: 594: 591: 589: 586: 584: 581: 579: 576: 574: 571: 569: 566: 565: 561: 559: 557: 553: 545: 542: 539: 536: 534:and so forth. 531: 526: 518: 512: 508: 505: 502: 499: 496: 493: 490: 486: 482: 479: 476: 473: 470: 466: 463: 460: 459:Jakarta Faces 457: 454: 451: 448: 447:Ruby on Rails 445: 442: 441:Microsoft IIS 438: 435: 432: 431: 430: 424: 419: 413: 411: 410:URL rewriting 403: 399: 396: 392: 388: 385: 381: 377: 376: 375: 366: 363: 355: 345: 341: 337: 331: 330: 325:This section 323: 314: 313: 307: 302: 300: 296: 288: 286: 282: 281:search engine 274: 268: 262: 260: 252: 246: 244: 240: 236: 232: 228: 224: 218: 214: 206: 204: 202: 198: 194: 190: 186: 182: 178: 174: 170: 166: 162: 161:URL rewriting 158: 154: 150: 146: 135: 132: 124: 113: 110: 106: 103: 99: 96: 92: 89: 85: 82: –  81: 77: 76:Find sources: 70: 64: 63: 59: 54:This article 52: 48: 43: 42: 37: 33: 19: 18:URL rewriting 798:. Retrieved 788: 777: 765:. Retrieved 760: 750: 738:. Retrieved 728: 716: 704: 693: 682: 670:. Retrieved 660: 649: 638: 621: 556:control flow 549: 532:10.1-RELEASE 428: 417: 409: 407: 373: 358: 349: 326: 299:HTTP request 292: 285:location bar 278: 272: 266: 256: 250: 242: 231:static pages 227:query string 220: 213:Semantic URL 192: 188: 184: 180: 160: 148: 142: 127: 121:January 2011 118: 108: 101: 94: 87: 75: 55: 794:"Clean URL" 767:24 December 740:25 December 736:. nginx.org 495:CodeIgniter 485:Mojolicious 295:URL-encoded 201:abstraction 165:URL mapping 796:. DocForge 627:filesystem 352:April 2013 336:improve it 245:might be: 211:See also: 189:fancy URLs 173:web server 91:newspapers 58:references 603:Permalink 578:.htaccess 395:bandwidth 340:verifying 195:URLs, or 153:rewriting 827:Category 800:25 April 672:25 April 562:See also 501:lighttpd 489:Catalyst 293:will be 550:From a 530:FreeBSD 467:uses a 334:Please 105:scholar 36:Rewrite 465:Django 185:pretty 107:  100:  93:  86:  78:  614:Notes 513:like 507:nginx 380:users 207:Usage 197:slugs 181:short 112:JSTOR 98:books 802:2014 769:2014 742:2014 674:2014 593:HTTP 521:f101 487:and 475:Java 382:and 259:blog 239:wiki 215:and 157:URLs 147:, a 84:news 833:URL 511:URI 338:by 193:SEF 187:or 175:or 155:on 143:In 60:to 829:: 759:. 404:). 287:: 257:A 183:, 71:. 804:. 771:. 744:. 676:. 443:. 397:. 386:. 365:) 359:( 354:) 350:( 332:. 134:) 128:( 123:) 119:( 109:· 102:· 95:· 88:· 65:. 38:. 20:)

Index

URL rewriting
Rewrite system
Rewrite

references
primary sources
secondary or tertiary sources
"Rewrite engine"
news
newspapers
books
scholar
JSTOR
Learn how and when to remove this message
web applications
rewriting
URLs
URL mapping
web application
web server
web application framework
slugs
abstraction
Semantic URL
URL shortening
dynamic content
query string
static pages
subdirectory hierarchy
wiki

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.