• PHP, WordPress and URL rewrites

    Ganesh Member

    a request that is being sent to a wordpress site like for example:

    example.com/wpec/search/?query=gold

    On the wordpress site i do some url rewrite filtering to add some custom rules but i can`t get the above one done.
    I tried with a rule as follows but it seems to not work

    'wpec/search/(.+?)/?$' => 'index.php?wpec=list&wpec_args=$matches[1]',

    Notice the “gold” parameter is variable depending on the search word

  • SapnaVishwas Member

    Could it just be that you need to escape the forward slash?

    'wpec\/search\/(.+?)\/?$'

Viewing 1 reply thread
  • You must be logged in to reply to this topic.