but the url didnt change like it should have in the rewrite rule.
That is not how mod_rewrite works. It does not change links for you.
You need to change all links in your code to view/inventory.php to product/
<a href="/product/">View Inventory</a>
mod_rewite will then map site.com/product/ to site.com/view/inventory.phpGo to the full post