My .htaccess
file
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^the-image-([A-Za-z0-9]+)-([A-Za-z0-9+]+)/?$ images/userfolder/$1/$2 [NC,L] #Loading Images
And in my PHP page
<img src='./the-image-$username-$image_id' alt='User Image' />
My aim is to load the image for each user based upon his username and Image ID.
The username is stored under $username
and Image ID under $image_id
variables. And the images will be located under images/userfolder/username/image.jpg
But the images are not getting loaded. What is the error in my syntax?
Note: The Image ID variable holds both the image name and it' extension. Example : 1.jpg