1 Reply Latest reply on Aug 10, 2007 1:01 PM by nummsa

    URL rewrite like MySpace

    briz26
      Hi All,

      Can anyone suggest the easiest solution to create virtual directories like you can on MySpace and then rewrite them to a dynamic page?

      I'd image you would have to strip the URL and query a database with the keyword from the URL. The database query, etc I can handle. But how can you get that keyword easily out of the URL. For example www.mysite.com/KEYWORD

      cgi.script_name? but theres more to it then that...

      Thanks for the help!
        • 1. Re: URL rewrite like MySpace
          nummsa Level 1
          The way I do this is using the Apache Webserver's mod_rewrite engine: http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html

          That is, of course, if you're running on an apache server and have the willingness/time to learn another interesting feature of Apache. I've been using this with Coldfusion, PHP, and many different pre-built CMS systems. If you're running IIS I know there is a non-free alternative, but I'd search for "IIS mod_rewrite" if that's the case.

          If you are running Apache and want to give it a try just search for "mod_rewrite howto" or something of the like.