I am new to this mod_rewrite. I was able to successfully rewrite the URL something like this: http://mydomain.com/products/12 : http://mydomain.com/products.php?prodId=12
But when I specify http://mydomain.com/products/12 in the address bar, the css and js files are not loading.
But when I turn to http://mydomain.com/products.php?prodId=12 , js and css load correctly. Please let me know if I missed something.
My .htaccess looks like this:
Options +FollowSymlinks RewriteEngine on RewriteRule ^products/([0-9][0-9])/$ /products.php?prodId=$1 [L]
My css and js folders are also in the same folder.
source share