Skip to main content
added 804 characters in body
Source Link
slm
  • 380.1k
  • 127
  • 793
  • 897

These aren't really physical directories on the system. They're dynamic names within the URL name space that get mapped to either a physical directory or are interpreted as an argument to a function or application which then acts on it.

It's typically URL rewriting that's facilitating this "magic". Take a look at this tutorial from smashingmagazine if you're really curious, titled: Introduction To URL Rewriting.

Example

Say you're wikipedia. The entire site is primarily PHP based so the real URLs are something like this:

http://en.wikipedia.org/w/index.php?title=Barack_obama

http://en.wikipedia.org/w/index.php?title=Barack_obama 

But when you're at the site you're likely to see the page like this:

http://en.wikipedia.org/wiki/Barack_obama

http://en.wikipedia.org/wiki/Barack_obama 

The Apache configuration that makes this happen:

RewriteEngine On #Look for the word "wiki" followed by a slash, and then the article title RewriteRule ^wiki/(.+)$ w/index.php?title=$1 [L] 

This takes the URL that the browser is accessing "http://en.wikipedia.org/wiki/Barack_obama" and rewrites it internal to the web server (Apache) to this, "http://en.wikipedia.org/w/index.php?title=Barack_obama".

I often think of this as similar to on Star Trek where they had the universal translator. The server is taking one set of URLs on the input (from the browser) and on the backside is translating those URLs into other ones which map to actual applications and scripts on the server or even other servers.

These aren't really physical directories on the system. They're dynamic names within the URL name space that get mapped to either a physical directory or are interpreted as an argument to a function or application which then acts on it.

It's typically URL rewriting that's facilitating this "magic". Take a look at this tutorial from smashingmagazine if you're really curious, titled: Introduction To URL Rewriting.

Example

Say you're wikipedia. The entire site is primarily PHP based so the real URLs are something like this:

http://en.wikipedia.org/w/index.php?title=Barack_obama

But when you're at the site you're likely to see the page like this:

http://en.wikipedia.org/wiki/Barack_obama

The Apache configuration that makes this happen:

RewriteEngine On #Look for the word "wiki" followed by a slash, and then the article title RewriteRule ^wiki/(.+)$ w/index.php?title=$1 [L] 

These aren't really physical directories on the system. They're dynamic names within the URL name space that get mapped to either a physical directory or are interpreted as an argument to a function or application which then acts on it.

It's typically URL rewriting that's facilitating this "magic". Take a look at this tutorial from smashingmagazine if you're really curious, titled: Introduction To URL Rewriting.

Example

Say you're wikipedia. The entire site is primarily PHP based so the real URLs are something like this:

http://en.wikipedia.org/w/index.php?title=Barack_obama 

But when you're at the site you're likely to see the page like this:

http://en.wikipedia.org/wiki/Barack_obama 

The Apache configuration that makes this happen:

RewriteEngine On #Look for the word "wiki" followed by a slash, and then the article title RewriteRule ^wiki/(.+)$ w/index.php?title=$1 [L] 

This takes the URL that the browser is accessing "http://en.wikipedia.org/wiki/Barack_obama" and rewrites it internal to the web server (Apache) to this, "http://en.wikipedia.org/w/index.php?title=Barack_obama".

I often think of this as similar to on Star Trek where they had the universal translator. The server is taking one set of URLs on the input (from the browser) and on the backside is translating those URLs into other ones which map to actual applications and scripts on the server or even other servers.

added 804 characters in body
Source Link
slm
  • 380.1k
  • 127
  • 793
  • 897

These aren't really physical directories on the system. They're dynamic names within the URL name space that get'sget mapped to either a physical directory or get'sare interpreted as an argument to a function or application which then acts on it.

It's typically URL rewriting that's facilitating this "magic". Take a look at this tutorial from smashingmagazine if you're really curious, titled: Introduction To URL Rewriting.

Example

Say you're wikipedia. The entire site is primarily PHP based so the real URLs are something like this:

http://en.wikipedia.org/w/index.php?title=Barack_obama

But when you're at the site you're likely to see the page like this:

http://en.wikipedia.org/wiki/Barack_obama

The Apache configuration that makes this happen:

RewriteEngine On #Look for the word "wiki" followed by a slash, and then the article title RewriteRule ^wiki/(.+)$ w/index.php?title=$1 [L] 

These aren't really physical directories on the system. They're dynamic names within the URL name space that get's mapped to either a physical directory or get's interpreted as an argument to a function which then acts on it.

These aren't really physical directories on the system. They're dynamic names within the URL name space that get mapped to either a physical directory or are interpreted as an argument to a function or application which then acts on it.

It's typically URL rewriting that's facilitating this "magic". Take a look at this tutorial from smashingmagazine if you're really curious, titled: Introduction To URL Rewriting.

Example

Say you're wikipedia. The entire site is primarily PHP based so the real URLs are something like this:

http://en.wikipedia.org/w/index.php?title=Barack_obama

But when you're at the site you're likely to see the page like this:

http://en.wikipedia.org/wiki/Barack_obama

The Apache configuration that makes this happen:

RewriteEngine On #Look for the word "wiki" followed by a slash, and then the article title RewriteRule ^wiki/(.+)$ w/index.php?title=$1 [L] 
Source Link
slm
  • 380.1k
  • 127
  • 793
  • 897

These aren't really physical directories on the system. They're dynamic names within the URL name space that get's mapped to either a physical directory or get's interpreted as an argument to a function which then acts on it.