I want to enable my users to enter search queries using a URL like this:
www.domain.com/searchterm
or with a trailing slash like this:
www.domain.com/searchterm/
However, I want to capture certain search terms and redirect them to an actual directory. For example, a query like this:
www.domain.com/css/site.css
should actually point to the CSS file, and should not pass "css/site.css" as the search term.
Here's my non working code:
RewriteRule ^/(.+)/?$ /index.php?search=$1 [L]
RewriteRule ^/css/(.+)$ /css/$1 [L]
This doesn't work - can anyone tell me what I'm doing wrong?