Hiding path and parameters in url

Hi,

How to hide the path and parameters in the url
ex : www.domainname.com/login.php?quantity=4

and I just wanted it to show only

www.domainname.com/login.php

Can anyone please help me ?? I am using CentOS and apache web server.

What CMS is your website based on?
If it is on Wordpress, you can do

Login to Admin Dashboard >> Permalinks

Under Common Settings
use option ‘Post name’ or ‘Custom Structure’
Save and you should be done!

Hi Avi,

Thanks for the reply, I am using apache webserver on linux installed with PHP I tried with below codes but not working.

RewriteRule ^/?([a-z]+)$ $1.php [L]

RewriteCond %{REQUEST_FILENAME}.php -f

RewriteRule ^/?([a-zA-Z0-9]+)$ $1.php [L]

RewriteCond %{REQUEST_FILENAME}.html -f

RewriteRule ^/?([a-zA-Z0-9]+)$ $1.html [L]

Please help me to solve this ASAP.

My issue: how to hide parameters in the url
eg: domainname.com/viewbasket.html?name=1&email=start should be displayed as domainname.com/viewbasket.html

@kiran_lintech,
I didnt asked information regarding ur web server or php.

All i want to know is - is your website developed from scratch or using some kind of CMS like wordpress, joomla, drupal …

Let me know what CMS you r using, if any.

Its developed from scratch…only html and php codings.

Something like this maybe?

RewriteEngine On  
RewriteCond %{QUERY_STRING} !="" 
RewriteRule ^(.*)$ /$1? [R=301,L]