Posted by J.O. Aho on 11/20/06 13:19
MS wrote:
> I am not an expert at .htaccess but this should be straight forward for
> somebody in the know and could save me hours of research.
>
> I have URLs to profiles...
>
> www.mysite.com/profile.php?lookup=7
>
> where the 7 is the user_id.
>
> What I want is to make an Easy URL as follows
>
> www.mysite.com/myusername
>
> Obviously this page does not exist, but what I want to try and accomplish
> is...
>
> If myusername is not a valid page I want to redirect to index.php passing
> myusername as an argument.
>
> EG.
> www.mysite.com/index.php?username=myusername
>
> Where I will then search for the username within my database and then,if
> found, redirect to the correct page..
> www.mysite.com/profile.php?lookup=7
>
> Or is there a better way to do this?
You would need a redirect module for the apache server
see the following page: http://httpd.apache.org/docs/2.2/rewrite
//Aho
[Back to original message]
|