I have a link http://localhost/css/dictionary?letter=a which I want to make it like this http://localhost/css/dictionary/a
but somehow it says 404 message
Am i missing something here? this is my code in .htaccess please help me.
RewriteEngine On
RewriteBase /css/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.php [NC]
RewriteRule ^([a-zA-Z])$ dictionary?letter=$1
I’ve been scouring all the youtube videos and reading articles and so far im still in trouble please i need your help.
It’s because you have 2 rules, and the first one matches first (as it is more general than the second).
The second doesn’t even check for
dictionaryat all.The second condition should be: