Link to home
Create AccountLog in
Avatar of killers376
killers376

asked on

PHP Url Routing

I want to redirect the url .. www.example.com/membername to www.example.com/profile.php?id= sumthing How can I do this ..I heard this can be done by .htaccess file and I want the url to be www.example.com/membername and results are from  www.example.com/profile.php?id=xxx

  I m new to .htacess please explain me how can i do this..
ASKER CERTIFIED SOLUTION
Avatar of hernst42
hernst42
Flag of Germany image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of killers376
killers376

ASKER

can u be more clear.. Where shld i specify that example.com/member sld post to example.com/profile.php...
See http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html

> Where shld i specify that example.com/member sld post to example.com/profile.php...
its the last line in the given code of the .htacess
Its not working .. I tried.. example.com/member with the .htacess file in the root dir... and mod_rewrite option enabled in apache config.. Tell me where I went wrong
What do you get a error 404 or what. Maybe your .htacess isn't allowed at all.
Yes Im getting 404 error.. I tried in localhost and in my host also ..


http://trishna08.org/btechguru/

http://trishna08.org/btechguru/XXX is not working...
Avatar of Steve Bink
Is this solved now?  If not, post the rewrite code you have currently, and what is happening when you try to trigger it.