What Am I Doing Wrong on this HTACCESS file!

Posted by Ronnie Chester Lynwood on Stack Overflow See other posts from Stack Overflow or by Ronnie Chester Lynwood
Published on 2010-04-07T01:07:12Z Indexed on 2010/04/07 1:13 UTC
Read the original article Hit count: 239

Filed under:
|
|

Someone please tell me what is wrong with this htaccess rules?

 RewriteCond %{QUERY_STRING} ^q=(.*)&type=downway1$ [NC]
 RewriteRule ^search\.php$  /search\/%1\/1\/? [R=301,NC,L]

 RewriteCond %{QUERY_STRING} ^q=(.*)&type=(.*)$ [NC]
 RewriteRule ^search\.php$  /search\/%1\/%2\/1\/? [R=301,NC,L]

 RewriteRule search/(.*)/(.*)/$  /search.php?q=$1&page=$2 [L] <-- this and
 RewriteRule search/(.*)/(.*)/(.*)/$  /search.php?q=$1&type=$2&page=$3 [L] <-- this 

are not working in same time. for example TYPE = app Q = windows

if I search type by downway1 it works powerfully but if I search in app type Q becomes windows/app not only windows. help me please!

© Stack Overflow or respective owner

Related posts about php

Related posts about .htaccess