Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- mod rewrite + MySQL = clean URIs


g1smd - 8:34 am on Jul 24, 2010 (gmt 0)


The rewritten path BECOMES the web path, for the browser. The name, location and other identifying features of the resource being displayed is irrelevant to the browser ... it eats what the server feeds it.

The browser makes a URL request and the server returns content for that URL. Internally, the server might have pulled the content from a different internal path other than that implied by the URL. That is, the rewrite changes the default internal URL-path to server-filepath mapping inside the server.

The server fed it "/article/blah-blah", not "/index.php?p=123", therefore a request for "style.css" would be relative to the "/article" directory the browser "thought" it was in.

The browser requested "example.com/article/blah-blah" and a request for "style.css" would be relative to the "www.example.com/article/" URL the browser requested. The browser works only with URLs.


Thread source:: http://www.webmasterworld.com/apache/4171842.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com