diff --git a/src/search.rs b/src/search.rs index bf3e65b..1b5d1a9 100644 --- a/src/search.rs +++ b/src/search.rs @@ -71,9 +71,13 @@ pub async fn find(req: Request) -> Result, String> { return Ok(redirect("/")); } - if query.starts_with("r/") || query.starts_with("R/") || query.starts_with("user/") { + if query.starts_with("r/") || query.starts_with("user/") { return Ok(redirect(&format!("/{query}"))); } + + if query.starts_with("R/") { + return Ok(redirect(&format!("/r{}", &query[1..]))); + } if query.starts_with("u/") || query.starts_with("U/") { return Ok(redirect(&format!("/user{}", &query[1..])));