I have this line:
RewriteRule ^media/123/([a-z0-9\-]*)/$ /image.php?action=$1
Which throws up a 404 error, and this one:
RewriteRule ^media/123/$ /image.php?action=$1
Which works without the expression, as in it doesn’t throw up a 404 but is not helpful as the last part of the URL is not passed. Help?
(Both lines are not present togeather in the same htaccess file, just one at a time.)
Try:
I think you got 404 because of last /. You match 123/(any charcter zero or more times)/ and last / must exits! And that is not correct.