php - htaccess rewrite rule for loading image from another domain -
i developing multidomian admin panel in laravel. domians on same server. upload images specific domain inside admin panel example.com image: example.com/uploads/domainname/image.jpg
now inside domainname.com want use
<img src="domainname.com/uploads/image.jpg" >
instead of
<img src="example.com/uploads/domainname/image.jpg" >
approach using have controller responsible getting image content
domainname.com/image?path=uploads/domainname/image.jpg
and using htaccess
aliasmatch "^/uploads/$" "/home/dir/public_html/example/public/uploads/$1" rewriterule ^uploads/(.*)$ image?path=uploads/domainname/$1
but it's not working. appreciated.
thanks
Comments
Post a Comment