I have mod_rewrite working on most of my site. Right now I have a search that normally would point to
search.php?keyword=KEYWORD
And I'm trying to rewrite that to
search/?keyword=KEYWORD
Just to make it a little bit cleaner. So here's my mod_rewrite. (There are other rules I'm just posting the one that isn't working.)
RewriteRule ^search/?keyword=([^/\.]+)/?$ search.php?search=$1
When I type a search in the address bar way I want it to be, I get a page telling me its a "broken link" (I'm guessing that that's Chrome's equivalent of a 404 error). So what am I doing wrong? I think that the problem is the '=' or the '?' sign in the rule (the first part) because when I take the ?keyword= part out, it works. Does that make sense?
EDIT: This is my full .htaccess code:
RewriteEngine on
RewriteRule ^$ index.php
RewriteRule ^thoughts$ archives.php
RewriteRule ^thoughts/$ archives.php
RewriteRule ^about$ about.php
RewriteRule ^about/$ about.php
RewriteRule ^search/\?keyword=([^/]+)$ search.php?search=$1
RewriteRule ^tags/([^/]+)$ tags.php?tag=$1
RewriteRule ^thoughts/([^/]+)$ post.php?title=$1 [L]
Still getting an error page...