Hi,

can any body, tell me how to follow the url rewriting using .htaccess. Am using xampp,where can i able to find .htaccess file. How to change/add in the .htaccess file,
to get the changed URL in the address bar


http://www.example.com?name=value

to change in the address bar as

http://www.example.com


Please any body help me out. Thanks in advance

You have to create a .htaccess file using an editor like notepad or notepad++, before that you should activate the rewrite option in httpd.conf.
Use this link to understand how to activate this http://www.lancelhoff.com/enabling-htaccess-in-apache-on-windows/.
The part with the rewrite it is new for me so I can help you just with this video http://www.youtube.com/watch?v=oqg6Chk6L7M and maybe a sample of .htaccess file.
I you want the sample give me a replay Good luck

you mean there's an htaccess already and it's ruining the normal operation? because if there's no htaccess, then the path /htdocs/emp/emp.php will be viewed in http://localhost/emp/emp.php, take note of the folder "emp".

I understand that you don't have a htaccess file in your folder with the project emp and you want to redirect localhost tolook like http://localhost/emp.php.
To do that you will have to use my first post and enable htaccess using that and then you will have to change some settings in your xampp.
Xampp is known for it's problems like when you type just localhost it will go to the index of xampp not you custom index.
Hope that helps you,if not try to watch killerphp advanced php part 7 to understand htaccess.
Bye

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.