Page 1 of 1

redirect

Posted: Wed Jul 06, 2005 2:55 am
by s.dot
I need something that will do this

make a link like http://www.domain.com/page.php?user=username
avaiable when someone types in http://www.domain.com/username

I've done this before, I just forget how I did it. :evil:
It involved editing the .htaccess page.

Anyone have any ideas?

Posted: Wed Jul 06, 2005 2:59 am
by delorian
Google *mod_rewrite* or go directly to http://httpd.apache.org/ and look for mod_rewrite module.

UPDATE:

Code: Select all

// example
// rewrites domain.com/article/articlename into domain.com/index.php?article=articlename
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)article/(.*)$ $1index.php?article=$2

Posted: Wed Jul 06, 2005 3:02 am
by s.dot
Appreciated. Thanks. :)

Posted: Wed Jul 06, 2005 3:38 am
by s.dot
wow, that documentation just thorougly confused me.

Could someone provide me an example of how to do what I need to do?