0

Our website has been redeveloped, and I have been asked to ensure that the previous form of certain URIs are redirected to the new form, so that existing links, bookmarks, etc, don't break.

The previous URIs were of the form /people/show/person/123 (where the last part is a numeric id)

I have written a RewriteRule, but it does not seem to be transferring the matched string to the rewritten URI, for some reason.

RewriteRule ^/people/show/person/(.*)              /people?person=$1 [R]

If I don't include the [R] redirect flag, the rule doesn't seem to work at all, and I get:

The requested page "/people/show/person/123" could not be found.

With the [R] flag, instead I get:

The requested page "/people?person=" could not be found.

and so it seems that the page id is not being transferred to the rewritten URI.

The new website is running Drupal (the old site was not), and I suppose it may be possible that something in Drupal's own URI rewriting may also be influencing what happens somewhere in the process?

Can anyone suggest what I need to do to get the desired outcome (eg, /people?person=123)?

dave559
  • 101
  • 3

0 Answers0