views:

17

answers:

1

i have a htaccess file which redirectes all the requests to index.php

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule .* ./index.php

My question is i would like to make a redirect to folder which doesn't exist and it should not affect the present htaccess redirects to index.php. since it is linked to entire website

for eg

domain.com/search=kannan&id=21

to

domain.com/kannan

I just need a way to allow only this request and everything else goes to index.php, any ideas...

A: 

You could use a condition to capture requests that match a specific pattern, like:

RewriteCond %{REQUEST_URI} ^domain.com/search(.+)$

Then do your rewrite. Or: http://www.google.com/search?q=htaccess+query+string+rewrite

Casey
thanks, it did work
cool, glad it worked. you should accept my answer so others can find it :)
Casey