Multiple variables in a mod_rewrite URL string


/ Published in: Apache
Save to your folder(s)



Copy this code and paste it in your HTML
  1. RewriteRule ^([a-zA-Z0-9-]+)/?([a-zA-Z0-9-]+)?$ index.php?var1=$1&var2=$2
  2.  
  3.  
  4. Result : www.example.com/[var1.value]/[var2.value]

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.