URL redirect for user profile in .htaccess -


Can you please tell me how do I get the URL to www.santaraj.com/steve A new file in my profile.php ?

In fact I want to display the User Profile with profile.php but the URL will be created as the domain Name / Username ( Www.santaraj.com/steve ). A good example is www.twiiter.com/kk .

Put the following rules in .htaccess in your document root:

Rev. [A-z0- 9] +) $ /profile.php?user=$1 [L]

(Below is a 'rewriteign on' in the same file)

When someone If the user goes to www.santaraj.com/steve, your profile.php script will be running with the user = Steve's query string.

Note how regular expressions in the rule assume that the user name is made up of numbers and lowercase letters. You can change it, which definitely makes sense for you.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -