After uploading my Kohana project to my Godaddy server, I noticed my standard .htaccess file wasn't working sufficiently to provide the clean URLs. After some guidance, I ended up with the following rule:
RewriteRule .* index.php?kohana_uri=$0 [PT,L]
This got my nice-URLs working again, but today I find out that it may be breaking my internal search-engine, which also uses GET-style variables:
/search?terms=php
The values aren't being found by the scripts. They are on my development-server which doesn't have the modified RewriteRule, but not on the Godaddy server which does use the RewriteRule.
Am I right in assuming that rule is breaking any scripts ability to read from $_GET, and if so how can I remedy this?
Maybe using QSA in your rewriterules, like this :
RewriteRule .* index.php?kohana_uri=$0 [PT,QSA,L]
See the manual of mod_rewrite (quoting) :
'qsappend|QSA' (query string append)
This flag forces the rewrite engine to append a query string part of the substitution string to the existing string, instead of replacing it. Use this when you want to add more data to the query string via a rewrite rule.
Might help (not tested in your particular case, but I remember have used this some time ago, for some kind of problem like this one)
I think you could add: RewriteCond $1 !^(search)
, or a variation of such.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With