I want to replace all the dashes from my PHP filenames but I don't know how to do it.
Basically I have something like this:
http://localhost/category-activity.php
And I want to end up with this:
http://localhost/category/activity
I also need that the script scans for ALL dashes meaning that if I have something like:
http://localhost/category-activity-subactivity.php
Ends up in something like:
http://localhost/category/activity/subactivity
I am already using the following code to remove the extension
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php