Jump to content
Larry Ullman's Book Forums

kmicheal

Members
  • Posts

    2
  • Joined

  • Last visited

kmicheal's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thanks for the suggestion and you did understand the problem correctly. I suppose I was looking to see if there was a solution that involved the mod_rewrite itself, such as do you need to now write a new rule to cover the search form alone (and what this would look like). The whole issue came about as I was working through Chapter 3. Once I created the .htaccess (to create the pretty urls), the previous work for processing a search form stopped working but this was never addressed in the chapter. It tells you to change the 'action' reference in the search form, but it doesn't tell you that you will lose your query string or what to do about it.
  2. I have a question about the mod rewrite section in Ch 03. After creating the .htaccess file, the search form stops working. Even after changing the action to /search/, it no longer recognises the additional query string (i.e. &terms=) and so you always receive the 'Please use the search form to search this site.' notice. If I change the form method to POST and change the $_GETs to $_POSTs in search.inc.php for processing, it works fine. I'm assuming that it has to do with the mod rewrite in that it rewrites /search/ to index.php?p=search but the rest of the query string supplied by the form is lost. (I checked $_GET upon arrival in search.inc.php and the only value is for p even though terms=whatever shows in the URL: /search/?terms=whatever) Can someone tell me how to adjust the mod rewrite so that if there are additions made to the query string via search form, e.g., it will recognise these? (ie if the URL says /search/?terms=whatever it will rewrite this to index.php?p=search&terms=whatever but if it says /about/ it will work as described in the book)? Or if I'm off the mark and it's NOT the mod rewrite, then what else about the search form and processing needs to change? Thanks.
×
×
  • Create New...