I am trying to rewrite the urls like this:
domain.com/news/12/imgname.jpg
to
domain.com/image.php?img=12/imgname
I use the following in my .htaccess file, but it does not seem to work:
RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^news/([0-9]+\/.*)\.jpg$ image.php?img=$1 [L]
Can someone help me see what I did wrong?
source share