I would like the URL:
http://domain.com/category/subcategory/title
To point to:
http://domain.com/posts/category/subcategory/title.php
My .htaccess file looks like this:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{QUERY_STRING} !^.+
#RewriteCond post/%{REQUEST_URI}.php -f
RewriteRule ^(.*)$ post/$1.php [L]
This works however when I uncomment the line above it does not work.
I have tried:
RewriteCond /post/%{REQUEST_URI}.php -f
RewriteCond post/%{REQUEST_URI}.php -f
RewriteCond post%{REQUEST_URI}.php -f
None of these work. What am I doing wrong?
Also is there an easy way to debug these rules? Like console logging variables or something?