views:

71

answers:

2

hello guys I'm using this htaccess script to set search.php?q=sometng&type=all to search/sometng/

RewriteCond %{QUERY_STRING} q=(.*)&type=all

RewriteRule ^search\.php$  /search\/%1\/? [R=301,L]

it works succesfully BUT I GET 404 error!

I've tried to put

RewriteRule ^search/(.*)/$ search.php?q=$1&type=all

it returns Attempting to open is not going to end any time entered into a routing loop.

whats wrong with this?

A: 

Try something like:

RewriteRule ^search/([a-z][A-Z])/([a-z][A-Z])/$ /search.php?q=$1&type=$2
Ronaldo Junior
A: 

Try

RewriteRule ^search/([^/]+)/([^/]+)$ search.php?q=$1&type=$2 [L]
Ben