I have http://localhost/auto/controller/user this url and i want to rewrite this url to http://localhost/auto/user please help me

what kind of your webserver ?

what kind of your webserver ?

My web server is apache

Make sure you have mod_rewrite enabled in apache and AllowOverride All for the directory in question in your apache configuration file (e.g., /etc/httpd/conf/httpd.conf.

Create a file called .htaccess in your webroot and add the following lines:
RewriteEngine on
RewriteRule ^auto/controller/user auto/user

A guide on how to use .htaccess files can be found here:
http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html

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.