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..
I m new to .htacess please explain me how can i do this..
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
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
> 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
ASKER
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.
ASKER
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...
http://trishna08.org/btechguru/
http://trishna08.org/btechguru/XXX is not working...
Is this solved now? If not, post the rewrite code you have currently, and what is happening when you try to trigger it.
ASKER