I have queries like this:
example.com/folder/?q=keyword
Please suggest how to redirect all queries that contain "keyword" as a parameter to other file on server:
/folder/core/index.php?id=$1
I mean $1
must be keyword
Here is my example:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^q=\/(.*)$
RewriteRule ^/?$ /folder/core/index.php?id=$1 [L]
If you are using .htaccess in
folder/
directory then try with below,