• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Rewrite Engine Basics

By Abhishek Ghosh January 14, 2024 9:29 am Updated on January 14, 2024

Rewrite Engine Basics

Advertisement

A rewrite engine makes it possible to rewrite requests addressed to a web server internally or to forward them externally. For the Apache web server, the software module mod_rewrite does this job. Other web servers such as Microsoft IIS, Nginx, Lighttpd or Hiawatha web servers offer similar functions.

This functionality was created in order to be able to provide an addressing scheme to the outside world that is independent of internal factors, so that, for example, even if the file hierarchy is changed, the URLs remain valid. This is also referred to as permanent links.

The rewrite engines allow address redirection to be made dependent on additional conditions in addition to the requested URL, such as the referencing URL, the user-agent identifier, or the IP address of the requesting client. In this way, for example, forwarding or cloaking can be realized.

Advertisement

---

Rewrite Engine Basics

 

Sample Application of Rewrite Engine

 

Rewrite engines are often used to make resources accessible with dynamic URLs at alternate addresses.

The resource with the internal, technical address

Vim
1
/b/index.php?title=pages

can also be reached, for example, at the following address

Vim
1
/blog/pages

To the outside world, instead of dynamic, parameterized addresses, seemingly static addresses are used. This is useful because short, self-explanatory addresses are usually considered to be more readable, easier to remember, and generally more trustworthy. This is also referred to as clean URLs.

The implementation of the use case shown varies depending on the web server software used and the context. Typically, regular expressions are used to define a search pattern that is applied to a desired target pattern. The search pattern is the apparent static address. The target pattern is the internal or physical resource. The dynamic ranges, such as the article ID of an article from the search pattern, are usually transferred to the target pattern with the help of variables.

Below are some examples of the concrete implementation for the Apache module mod_rewrite, the web server nginx and the web server Lighttpd.

Apache/mod_rewrite

Vim
1
2
RewriteEngine on
RewriteRule ^/blog/(.*)$ /w/index.php?title=$1

nginx

Vim
1
2
3
location /blog {
   rewrite ^/blog/(.*)$ /index.php?title=$1;
}

Lighttpd

Vim
1
2
3
url.rewrite-once = (
    "^/blog/(.*)$" => "/index.php?title=$1"
)

Tagged With open53l
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Rewrite Engine Basics

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • How To Install lighttpd PHP5-FPM (LLMP CentOS 7)

    Here Is How To Install lighttpd With PHP 7 FPM (CentOS 7). lighttpd Is Not Production Ready and CentOS is Better OS Over Ubuntu or Debian.

  • WordPress & PHP : Different AdSense Units on Mobile Devices

    Here is How To Serve Different AdSense Units on Mobile Devices on WordPress With PHP. WordPress Has Function Which Can Be Used In Free Way.

  • WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud

    Here is a Step by Step Guide on Setting Up WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud with All Commands and the Configuration.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

vpsdime

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Cloud-Powered Play: How Streaming Tech is Reshaping Online GamesSeptember 3, 2025
  • How to Use Transcribed Texts for MarketingAugust 14, 2025
  • nRF7002 DK vs ESP32 – A Technical Comparison for Wireless IoT DesignJune 18, 2025
  • Principles of Non-Invasive Blood Glucose Measurement By Near Infrared (NIR)June 11, 2025
  • Continuous Non-Invasive Blood Glucose Measurements: Present Situation (May 2025)May 23, 2025
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2026 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy