# search.php的永久链接无法重定向到/search

**URL:** <https://meta.discourse.org/t/permalink-to-search-php-failing-to-redirect-to-search/73158>\
**Category:** Product Support\
**Created:** [2017 年10 月 31 日 17:42 UTC](https://meta.discourse.org/t/permalink-to-search-php-failing-to-redirect-to-search/73158 "2017-10-31T17:42:17Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![smaffulli](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/smaffulli/32/120462_2.png) [@smaffulli](https://meta.discourse.org/u/smaffulli)\
发布日期： [2017 年10 月 31 日 17:42 UTC](https://meta.discourse.org/t/permalink-to-search-php-failing-to-redirect-to-search/73158/1 "2017-10-31T17:42:17Z")

</div>

I noticed today that the permalink from `search.php` to External URL `/search` is not working properly. I get displayed a blank page, no html at all.

nginx throws a 406 error

```plaintext
[31/Oct/2017:17:35:42 +0000] "discussion.dreamhost.com" $IP.IP.IP.IP "GET /search.php HTTP/2.0" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0" "-" 406 211 "-" 0.379 0.379 "-"

```

the error on rails log shows that the permalink is somewhat processed by SearchController: is that correct? Any suggestion on how to properly redirect requests from `/search.php` to `/search`?

```plaintext
Started GET "/search.php" for $IP.IP.IP.IP at 2017-10-31 17:20:17 +0000
Processing by SearchController#show as 
Completed 406 Not Acceptable in 321ms (ActiveRecord: 43.6ms)

```

---

_[View the full topic](https://meta.discourse.org/t/permalink-to-search-php-failing-to-redirect-to-search/73158)._
