WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 4 years ago

#7450 closed enhancement (fixed)

If Pretty Permalinks on, enforce /search/ URL

Reported by: Viper007Bond Owned by: ryan
Milestone: 3.0 Priority: lowest
Severity: trivial Version: 2.6
Component: Permalinks Keywords: needs-patch close
Focuses: Cc:

Description

If Pretty Permalinks are on, we should redirect ?s=foobar to /search/foobar/ like we do with posts.

Change History (7)

comment:1 Otto426 years ago

Wouldn't that make every possible search redirect (and thus cause every search to actually happen twice)? Because you can't build an HTTP form that makes /search/foobar/ GET requests.

comment:2 DD326 years ago

and thus cause every search to actually happen twice

Not if you catch it early enough before it queries anything..

Because you can't build an HTTP form that makes /search/foobar/ GET requests.

Thats a good point however, A small oneline of JS can be used to achieve that though. A extra page request per search isnt that much of a performance hit IMO, just as long as the redirect functions hook early enough.

comment:3 Denis-de-Bernardy5 years ago

this would only work with js enabled. we'd need to search form to change the window.location to home_url/search/foo

comment:4 Denis-de-Bernardy5 years ago

  • Component changed from General to Permalinks
  • Owner changed from anonymous to ryan

should only work, even.

comment:5 Denis-de-Bernardy5 years ago

  • Keywords close added
  • Milestone changed from 2.9 to Future Release

suggesting wontfix

comment:6 markmcwilliams4 years ago

Possibly fixed, or solution found in r13483?

comment:7 Denis-de-Bernardy4 years ago

  • Milestone changed from Future Release to 3.0
  • Resolution set to fixed
  • Status changed from new to closed

looks as good as it'll get, yeah. trying to redirect urls on actual searches is a bit nuts. :-)

closing...

Note: See TracTickets for help on using tickets.