.htaccess rewrite url
I know not my .htaccess is working since it is showing the ErrorDocument 404 when it can't locate a file.

I am trying to re-write the url so that domain.com/products/123 will become domain.com?product.php?productid=123

This is my .htaccess and it is not doing the trick. When I write domain.com/products/123 in the browser, I get the ErrorDocument 404.


    RewriteEngine on
    RewriteRule ^/products/([0-9]+)/$ product.php?productid=$1

    ErrorDocument 404 /page404.php

What am I doing wrong?
.htaccess rewrite url
===

I know not my .htaccess is working since it is showing the ErrorDocument 404 when it can't locate a file.

I am trying to re-write the url so that domain.com/products/123 will become domain.com?product.php?productid=123

This is my .htaccess and it is not doing the trick. When I write domain.com/products/123 in the browser, I get the ErrorDocument 404.


    RewriteEngine on
    RewriteRule ^/products/([0-9]+)/$ product.php?productid=$1

    ErrorDocument 404 /page404.php

What am I doing wrong?