I am editing my htaccess file and I want to rewrite several variations of a html url name to read a database. It works except this for this point. If I have just one reWrite rule it does fine, but when I use multiple ones it does some crazy things (like add - in between words in variables)
What I am trying to do is this...
When someone click's on a link like... http://www.mysite.com/articles-Mortgage-Loan.html or http://www.mysite.com/articles-Mortgage-Loan-Company.html
or whatever... I want to query the database with php using the phrase entered after articles. I did up to 9 keywords in a phrase just to cover my bases.
Here is what I did...
RewriteEngine on
RewriteRule ^articles-(.*).html$ search2.php?kw1=$1
RewriteEngine on
RewriteRule ^articles-(.*)-(.*).html$ search2.php?kw1=$1+$2
RewriteEngine on
RewriteRule ^articles-(.*)-(.*)-(.*)-(.*).html$ search2.php?kw1=$1+$2+$3+$4
RewriteEngine on
RewriteRule ^articles-(.*)-(.*)-(.*)-(.*)-(.*).html$ search2.php?kw1=$1+$2+$3+$4+$5
RewriteEngine on
RewriteRule ^articles-(.*)-(.*)-(.*)-(.*)-(.*)-(.*).html$ search2.php?kw1=$1+$2+$3+$4+$5+$6
RewriteEngine on
RewriteRule ^articles-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*).html$ search2.php?kw1=$1+$2+$3+$4+$5+$6+$7
RewriteEngine on
RewriteRule ^articles-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*).html$ search2.php?kw1=$1+$2+$3+$4+$5+$6+$7+$8
RewriteEngine on
RewriteRule ^articles-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*).html$ search2.php?kw1=$1+$2+$3+$4+$5+$6+$7+$8+$9
Any Idea What to DO? What did I do wrong?