Posted By

aeboi80 on 07/05/10


modrewrite htaccess

Versions (?)

mod_rewrite Rewriting to

 / Published in: HTML

  1. Rewriting to
  2. If you type in browser you can see a profile over there. If you want to do the same kind of redirection i.e to then you can add the following code to the .htaccess file.
  3. RewriteEngine On
  4. RewriteRule ^([a-zA-Z0-9_-]+)$ user.php?username=$1
  5. RewriteRule ^([a-zA-Z0-9_-]+)/$ user.php?username=$1

Report this snippet  

You need to login to post a comment.