REWRITING URLS ON THE FLYTUESDAY, APRIL 6 2004 @ 05:36 PMThis is more of a note to myself and is not Flash related, but it might be useful to someone out there. Bottom line is that I want to know where to find this info later on, for proper documentation. Anyway, I needed to replicate the experience you get when accessing a redirection system like the ones used by the PHP online manual (try http://www.php.com/mysql_query) or Macromedia's 'go' pages (try http://www.macromedia.com/go/flex).
I found out this could be done directly from Apache, using mode_rewrite, a module write by Ralf Engelschall and available on Apache versions later than 1.3. Here you will find detailed information about how complicated processes does //1<\/div> relies on to provide extremely flexible and powerful URL manipulation mechanisms... and here you will find a guide to some popular uses for //1<\/div>. Both are highly recommended readings.
But if you are in a hurry, and would just like to have a solution for simple redirections like the examples mentioned, all you need is to follow this steps: First, we create the php file that would create the redirection. For sake of simplicity and to demonstrate the point of this example, we will just print the filename request:
Then, we create a new //1<\/div> file on the directory you will be using for redirection, in this case /go:
That's it! Now, whenever you make a request to your 'go' directory, //1<\/div> will print the last part of your url request. For example, http://www.digitalmediaconcepts.com/go/something.
Using some instructions we could redirect queries to specific documents, or send every failed request to a different web server. Very handy. Archived under: PHP. | Permalink | google | del.icio.us | digg ![]() |
LANGUAGESARTICLES
BOOK REVIEWSSYNDICATIONFLASH
FLASH (ESPA�OL)
ADOBE
AGGREGATORS
USER GROUPS |
|||


