Yeah that should work. Unless you are running the .htaccess from the root then the Rewitebase below might be unintentionally
taking you back to the the root folder which will ofcourse give you are error. If you are getting a page cannot be found (404) then
the number of parameters in the rule may be conflicting. Other than that your htaccess file is okay.

Steve Obbayi
Software Developer
http://sobbayi.com



----- "jamo njoroge" <patjayke@gmail.com> wrote:
> Here's a copy of the .htaccess file i simply see no reason why it's not working.

>
Options +FollowSymLinks
 
RewriteEngine On
Rewritebase /
RewriteRule ^([a-zA-Z0-9\-]+)/([a-zA-Z0-9\-]+)$ index.php?category=$1&searchKey=$2

>
Options All -Indexes

>
> On Tue, Dec 14, 2010 at 10:18 AM, Ndungi Kyalo <ndungi@gmail.com> wrote:
>
jamo,
>
> a link is a link is a link. static or dynamic, it should work as obbayi says.
>
>
>
> On 14 December 2010 02:06, jamo njoroge <patjayke@gmail.com> wrote:
>
Thanks again Steve
i think i might know where the issue is, correct me if im wrong but i dont think the rewrite rules work on hard coded link do they? i.e static links?

>
>
> On Tue, Dec 14, 2010 at 9:51 AM, Ndungi Kyalo <ndungi@gmail.com> wrote:
>
Check that .htaccess directives are allowed to override apache's httpd.conf settings. Specifically, look up the directive "AllowOverride" as pertains to your document root directory and set it to "All". Restart apache and try again.
>

>
> On 14 December 2010 01:43, jamo njoroge <patjayke@gmail.com> wrote:
>
Thanks Steve,
The module is setup ok as i have a rule the forces www.mydomain.com instead of mydomain.com and it works fine but for some reason the rule you gave me does not work.
>
>
>
On Tue, Dec 14, 2010 at 7:00 AM, Steve Obbayi <steve@sobbayi.com> wrote:
>
> RewriteEngine On
>
> RewriteRule ^([a-z0-9\-]+)/([a-zA-Z0-9\-]+)$ index.php?category=$1&mykey=$2
>
>
> If your module is actually set up okay the rule above should work for your link
>
> --
> Steve Obbayi
> Software Developer
> http://sobbayi.com

>
> ----- "jamo njoroge" <patjayke@gmail.com> wrote:
> >
Hi skunks,
i have been struggling on how to create a rewrite rule for this link on the htaccess file on my root folder anyone out there has a clue? Ive been to many online rewrite rule sir\tes where i feed this link and the resultant rule is simply not picked up by the mod_rewirite apache module.
 
http://www.mydomain.com/index.php?category=mycategory&mykey=mykey
>