• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

URL rewrite like MySpace

Guest
Aug 09, 2007 Aug 09, 2007

Copy link to clipboard

Copied

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!
TOPICS
Advanced techniques

Views

248

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 10, 2007 Aug 10, 2007

Copy link to clipboard

Copied

LATEST
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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation