My code is following, the first 2 rules are working fine, but I'm unable to work the 3rd one(Check if its category eg. /some-folder) page should be served by category.php file. Can anyone help?
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
# WORKING - Check if its a product eg. /some-folder/some-product.html
RewriteRule ^/?([^/]+)/.+\.html$ product.php [QSA,L]
# WORKING - Check if its a page eg. /some-page.html
RewriteRule ^/?[^/]+\.html$ page.php [QSA,L]
# NOT WORKING - Check if its category eg. /some-folder
RewriteRule ^/?[^/]+\$ category.php [QSA,L]