go from /find?name=abc to /find-name/abc - how to accomplish this

cmes - August 16, 2009 - 12:36
Project:Path redirect
Version:6.x-1.x-dev
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hi,

we have a drupal setup (v6) where currently the following URL exists:
www.website.com/find?name=john

the page 'find' already uses URL alias to point to the correct node. I would like to add the following (keeping the existing url to work):

www.website.com/find-name/john

When using this new syntax I should be redirected to the www.website.com/find?name=john page. Can this be done by using a RewriteRule or what options do I have?

In the current .htaccess file is nothing changed from the std Drupal setup. Clean URL is enabled. With path redirect i can do the redirect itself but can't specify the URL param.
Adding RewriteRule find-name/(.*)$ find?name=$1 [L,QSA] breaks my site

many thanks
cm

#1

Dave Reid - November 4, 2009 - 06:49

You should be using this in your Drupal's base .htaccess:

  RewriteBase /
  RewriteRule ^find-name/(.*)$ find&name=$1 [L,QSA,R]
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

#2

Dave Reid - November 4, 2009 - 06:50
Status:active» fixed

#3

System Message - November 18, 2009 - 07:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.