php - RewriteCond won't rewrite my URL, instead it throws and error 500 -


i trying strip out single level of new written directory avoid repetition of entity names in url. specific name of "well service" duplicated passing both page category , pump category url render page , perform relevant queries.

my current url looks this

http://mysite/wellservice/well-service/pumpid01 

although not major problem aesthetic perspective clean url further stripping 1 level of "well service" url create looks this:

http://mysite/well-service/pumpid01 

i have tried build query handle causes server respond error: 500, query can seen below:

rewritecond %{query_string} ^?id=([\w-]+)&s=wellservice&c=(well-service)$ rewriterule ^product.php/?$ /pumps/%2/%1/? [r=301,l] 

have done wrong in code error 500 returned, or not possible trying do.

note:

  • variable "id" = pumps id query database
  • variable "s" = category pump belongs to refine query result
  • variable "c" = page category generate page specific styling including active state


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -