I’ve successfully rewritten
RewriteRule ^alphabetical alpha.php
So that when anyone comes to http://www.example.com/alphabetical it loads alpha.php. However, I’m having problems creating a rule so that when someone comes to http://www.example.com/alphabetical/a it should loa alpha-a.php. This is the rule I’ve tried that isn’t working:
RewriteRule ^alphabetical/a alpha-a.php
put your second more specific rule on top of the the first rule.
RewriteRule ^alphabetical/a alpha-a.php
RewriteRule ^alphabetical alpha.php
further, you can use a $ at the end to denote an end of url, saying urls ending with ‘a’.