Reputation: 171
I have a WordPress installation. I have an image on this path:
http://www.somedomain.com/wp-content/themes/twentytwelve/image.php
Is it possible to link / rewrite it to this path instead?
http://www.somedomain.com/wp-content/themes/twentytwelve/image.png
Htaccess could be fine. Maybe match /image.php
?
Upvotes: 0
Views: 688
Reputation: 22071
You can try something like this:
Options +FollowSymlinks -MultiViews
RewriteEngine on
RewriteRule ^(script)/([^.]*)\.php$ $1/image.png [L]
hopefully it will help you achieve you looking for. Forgive me for any syntax error.
Upvotes: 0
Reputation: 32117
Try this in a .htaccess file:
RewriteEngine On
RewriteRule ^(.*)\.php$ $1.png
Upvotes: 1