I have to rewrite my web URL for example

http://www.site.com/profile/ -> profile.php
http://www.site.com/settings/ -> settings.php

and the other word of profile and settinhs is connect to user.php


basically push http://www.site.com/giffary/ - it's connect to user.php?title=giffary

however when i push http://www.site.com/profile/ - it's connect to profile.php not user.php.

how do i write .htaccess file

thanks :)

You will have to use mod_rewrite with this, clearly. I haven't examined it, but this config should work:

RewriteEngine On
RewriteBase /

# Ignore URLs that point to files/directories that actually exist.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Special rewrites
RewriteRule ^/profile/?$ /profile.php [L]
RewriteRule ^/settings/?$ /settings.php [L]

# User profile rewrites
RewriteRule ^/([^/]+)/?$ /user.php?name=$1 [L]