Page 1 of 1

Use htaccess file to change url variables

Posted: Tue Aug 30, 2011 8:38 am
by davidhopkins
Hello all.

I am trying to get to grips with htaccess files and being able to change how it reads variables.

Currently i have to use www.mydomain.com/Users/id=8 where 8 can be any number from 1-1000.

but what i want is the URL to look like www.mydomain.com/Users/8 so people can view their own profiles or others without having to remember the id bit

Thanks in advance

David

Re: Use htaccess file to change url variables

Posted: Tue Aug 30, 2011 11:28 am
by KCAstroTech
It looks like you are already rewriting "/Users/" somewhere seeing as there is no (?). If you could post your .htaccess file it would help us better understand your situation. Also, look here (http://corz.org/serv/tricks/htaccess2.php) at the section titled "not-so-simple rewriting ... flat links and more." That should give you some ideas to get started on.