Home arrow Site Administration arrow Page 7 - Getting More Out Of Apache (Part 2)

Just Rewrite It! - Administration

Learn more about the world's best-loved Web server, with examplesof Apache's authentication and logging capabilities, and also pay a briefvisit to its unique URL re-writing module.

TABLE OF CONTENTS:
  1. Getting More Out Of Apache (Part 2)
  2. Eyes Only
  3. Identity Check
  4. Grouping Things Together
  5. Timmmmmmbbbbberrrr!
  6. When Things Go Wrong
  7. Just Rewrite It!
  8. Putting It Into Practice
By: icarus, (c) Melonfire
Rating: starstarstarstarstar / 1
January 23, 2001

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
One of Apache's more powerful features - and also one of its least-knownones - is its URL rewriting module, which makes it possible to manipulateURLs using a rule-based rewriting engine in combination with regularexpressions.

Apache's URL rewriting engine was originally developed by Ralf Engelschallin 1996. He handed it over to the Apache developers, who integrated it intothe Web server, and it's been part and parcel of it since then.Note, however, that the engine needs to be compiled into the server to useit - so if you plan on trying out any of the examples below, you may needto re-compile your server with the mod_rewrite module first.

The basis of the mod_rewrite module is rulesets and conditions, which maybe specified in either the main "httpd.conf" configuration file or theper-directory ".htaccess" file. When the server receives a HTTP request,the rewriting engine begins checking for a matching ruleset; if it finds amatch, it substitutes the rewritten URL for the original one.

It's also possible to add conditions to specific rules - in this case, oncea ruleset is matched, the conditions attached to it are checked, and URLsubstitution occurs if they are found to be valid.

Rewriting rules are specified with the RewriteRule directive, whileconditions are specified with the RewriteCond directive. RewriteConddirectives need to precede RewriteRule directive.

 
 
>>> More Site Administration Articles          >>> More By icarus, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

SITE ADMINISTRATION ARTICLES

- Coding: Not Just for Developers
- To Support or Not Support IE?
- Administration: Networking OSX and Win 7
- DotNetNuke Gets Social
- Integrating MailChimp with Joomla: Creating ...
- Integrating MailChimp with Joomla: List Mana...
- Integrating MailChimp with Joomla: Building ...
- Integrating MailChimp with Joomla
- More Top WordPress Plugins for Social Media
- Optimizing Security: SSH Public Key Authenti...
- Patches and Rejects in Software Configuratio...
- Configuring a CVS Server
- Managing Code and Teams for Cross-Platform S...
- Software Configuration Management
- Back Up a Joomla Site with Akeeba Backup

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: