#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Location
    Nova Scotia, Canada
    Posts
    30
    Rep Power
    11

    Changing URL to something sensible


    Can someone help me out with mod_rewrite, which I have no clue about? lol All I need to is to have URLs changed from something like this:

    www.mysite.com/index.php?user=Dave

    to:

    www.mysite.com/Dave/index.php


    Thanks!
  2. #2
  3. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,186
    Rep Power
    9398
    1. Rewrite all your links to use that new form. It won't happen for you.
    2. In the root .htaccess
    Code:
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^/?([^/]+)/index\.php$ index.php?user=$1 [L]

IMN logo majestic logo threadwatch logo seochat tools logo