This is what I want -
When somebody enters site.com/page.php or site.com/page or site.com/page/ , all should work the same, and the url displayed in the address bar should be site.com/page [ I don't like extensions and trailing slashes ]
I also want to get rid of the www from the url bar, as it's unnecessary.
This is my current .htaccess files Rewrite rules -
RewriteEngine on
RewriteCond %{HTTP_HOST} ^site\.com
RewriteRule ^(.*)$ http://www.site.com/$1 [R=permanent,L]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
This solves the www and the extension issue, but not the trailing slash one!
But, more importantly, I recently installed WordPress at site.com/blog, but whenever I try to access that, I am redirected to the 404 page instead. It works when I remove all the Rewrites!
Have I messed up my rewrites? I am not a regular expressions ninja!