Reputation: 102
I created a dynamic image script in PHP but I want to show it as .png
.
What is the .htaccess
configuration to type domain.com/image/image.png
and return the content of domain.com/image/image.php
?
Upvotes: 0
Views: 370
Reputation: 4738
Assuming your .htaccess file is placed at your web root, give this a try:
RewriteEngine On
RewriteRule ^image/image\.png image/image.php [L]
Alternatively, you can name a directory "image.png" then place an index.php file in there thus: image/image.png/index.php
.
Upvotes: 1