I want to make soccer.jpg accessible from soccer.png even though only soccer.jpg excists on the server. how do i do this ?
Try this: RewriteEngine On RewriteBase / RewriteRule ^soccer.png$ /soccer.jpg [L] Code (markup): If your .jpg is located in some subfolder, then you will need to include that in the rule also, something like this: RewriteRule ^subfolder/soccer.png$ /subfolder/soccer.jpg [L] Code (markup):
I think you will also need to change the type. Look into AddType for apache. This will allow a jpg to be served as a png.
Sorry I didn't explain myself clearly enough. I didn't mean for just 1 file (i was just giving an example), I want all the files in the directory that are jpg to be served as png i tried looking into this before but it didn't seem to work out :/ can u maybe give me the exact code.
Scorpiono, what have I taught you? (.*) is greedy: RewriteRule ^subfolder/(.*?)\.png$ /subfolder/$1.jpg [L] Code (markup):