Talk:Rewrite engine

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computing (Rated Start-class)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.


Since "Search engine friendly URLs" gets redirected here and doesn't have its own page, should it be mentioned that these URLs are called "slugs"? It would be helpful to readers looking to search for more information on google. -- (talk) 18:54, 15 May 2009 (UTC)

 Done. There's now a (very brief) mentions of slug (web publishing) in the first paragraph. --DavidCary (talk) 04:45, 18 July 2012 (UTC)

Untitled, unsigned[edit]

A few days of research and much frustration seems to prove the following behaviors of mod_rewrite in Apache 1.3

Oldfilename is compared against regex patterns and condition criteria. If matched, rewrite rebuilds a newfilename by Substitution, then exits if [L] flag exists. If oldfilename != newfilename, the API process is started over. This eventually leads the newfilename back to the htaccess for matching.

Newfilename won't leave this 'loop' until: no regex matches are found, a matching rewrite has a [L] flag but doesn't change the filename, or the filename matches the same rewrite rule that changed it on the last loop. This last behavior is probably so an endless loop doesn't occur by default.

Also a regex backreference throws a 500 error if the referenced tag is optional and doesn't occur. (with a ? or * quantifier)


Using a URL rewrite engine, the website software can be presented with URLs in one form, while actual requests (and URLs seen by the user) are in another form. So rewrite engines allow URLs to be tidied up and made more user friendly, by configuring rewrite rules, rather than modifying the webserver softwar

Sorry but i don't understand, more user friendly?, can someone supply an example what url rewriting actually does?

  • jf: I second this original request. This page was helpful, but we need 3-4 examples of different uses of URL rewriting. That would do the trick.
  • dke: I 'third' the recommendation to provide illustrative example(s) in the top, introduction section. I'll add an Expandsection tag/template. DKEdwards 16:30, 22 May 2007 (UTC)

term is more general[edit]

Using of 'rewrite engine' term as URL rewriting is too special. Exists many other applications for rewriting engine. exists own world of 'rule rewriting' with applications, standards, etc. I. e. i think that this article must be chendged to 'rule engine: web'

Disagree. TheMissileSilo (talk) 16:50, 22 January 2008 (UTC)
Why ? —Preceding unsigned comment added by (talk) 16:21, 26 January 2008 (UTC)
Highly disagree. The term "rewrite engine" is almost always used to refer to the Apache mod_rewrite module, which does text substitution on URLs sent by browsers when they read Web pages. Thus, the term is even more specialized than general rule-rewriting, which would include logical systems that transform strings and sets of strings. WP always describes the most common usage first. WP is an encyclopedia. Please sign your Talk entries by ending them with four tildes. David Spector (talk) 16:24, 31 July 2013 (UTC)

Strongly agree. Rewriting engines are used in software reengineering to refactor code or even translate it from one programming language to another. — Preceding unsigned comment added by (talk) 19:26, 14 January 2015 (UTC)

I agree and disagree. First, "rewrite engine" is considerably more general than URL rewriting (applying to general rewriting systems). And second, "rewrite engine" is actually not that commonly used for URL rewriting beyond Apache mod_rewrite (a few other web server implementations seem to have copied this usage but not many or most; few web applications or their frameworks implement URL rewriting—instead choosing to use other forms of URL mapping or routing—and of those that do, very few seem to refer to it with the term "rewrite engine"). So in this article's current usage, "rewrite engine" is both too specific and not representative. (talk) 16:14, 26 December 2015 (UTC)

Implementation on Apache[edit]

It is a SEF URL, is also a "Rewrite engine"??

FOR Apache:

  1. Enable SEF in the CMS (like Joomla) configuration
  2. do NOT rename the htaccess.txt
  3. open /includes/sef.php and change this line: (~ line 217)
    return $mosConfig_live_site."/".$string;
    return $mosConfig_live_site."/index.php/".$string;

For this to work, you will have to make sure AccepPathInfo is set to on in the apache configuration.


No Explanation Given[edit]

This page says:

"Better ranking in search engines (Search engine optimization)"

and has a link to a page on SEO. But the linked-to page has no explanation of how URL rewriting can optimize searches, nor does this page provide an explanation. —Preceding unsigned comment added by (talk) 22:46, 28 May 2009 (UTC)

Basically the idea is that you can pack descriptive keywords into the URL, which makes it more user-friendly and possibly search-engine-friendly if they choose to analyze URLs. I have updated the list to reflect this. Maghnus (talk) 05:05, 29 May 2009 (UTC)

Confusing Example[edit]

This example seems to contradict the point it's trying to make, because the second query is more readable than the first (because the month and day can be told apart):

"Known drawbacks:

  • In some cases, for example if user modifies URL to get specified data the rewrite engine may hinder from querying. See below example:
Which is a month and which is a day?
The query like that is more useful than:"
    • The first URL treats a year as a "folder" that contains months, and a month as a "folder" that contains days. It's the only logical way to read it. -- (talk) 14:41, 14 December 2011 (UTC)

Introductory definition flawed?[edit]

From this article's current introduction:

A rewrite engine is software located in a Web application framework running on a Web server that modifies a web URL's appearance.

A rewrite engine needn't be located in a web application framework. It can well be part of the web server software itself (e.g. Jetty [1]), being transparent to some web application framework running atop this web server software. --Abdull (talk) 11:47, 29 August 2012 (UTC)

Based on my research you are right and URL rewriting is much more commonly implemented in web servers than web applications (and/or their frameworks). I fixed the lead clarify this. (talk) 16:02, 26 December 2015 (UTC)

A simplification[edit]

I think this entry should mention that...

--- URL rewriting is the process of creating an alias for website content. The use of regular expressions and filter conditions, allows for the automatic reconstruction of elaborate address. ---

The use of this 'alias' terminology above underscores the persistent and possibly duplicating nature of a rewritten URL. It also exposes the fact that a URL rewrite is a re-write to the server application of a given URL and not the other way around. — Preceding unsigned comment added by (talk) 00:25, 13 October 2012 (UTC)

Beyond URL rewriting[edit]

It should be noted that the term rewrite engine has been applied to general rewriting systems well beyond URL rewriting. As such, I do not believe this article is representative of its current title. URL rewriting seems like a much more notable title for what this article currently seems to cover. This article's usage of the term "rewrite engine" seems to mostly stem from the Apache mod_rewrite. Only a few other URL rewriting implementations have copied this usage—many web server and web application/web framework implementations barely mention "rewrite engine" if at all (but "URL rewriting" if implemented seems the most commonly used term). "URL rewriting" seems to be a subset of both the general concept of "rewriting" and URL mapping. (talk) 15:57, 26 December 2015 (UTC)

We're to ger[edit]

The url Shodipo Ayomide (talk) 18:11, 21 October 2016 (UTC)