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

    Join Date
    Mar 2004
    Location
    Nova Scotia, Canada
    Posts
    27
    Rep Power
    0

    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. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,072
    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