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.
 

"Slugs"[edit]

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. --76.94.125.47 (talk) 18:54, 15 May 2009 (UTC)

Yes check.svg 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)

examples?[edit]

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 194.242.116.68 (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)

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;
    to
    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.

Redirecting[edit]

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 208.240.243.170 (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?
http://www.example.com/Blogs/2006/12/10/
The query like that is more useful than:
http://www.example.com/Blogs/Posts.php?Year=2006&Month=12&Day=10"
    • 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. --147.114.44.208 (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)

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 99.244.96.40 (talk) 00:25, 13 October 2012 (UTC)