Forum Moderators: phranque

Message Too Old, No Replies

How to rewrite for this task

         

ajs83

1:35 am on Oct 1, 2005 (gmt 0)

10+ Year Member



I am working on a dynamic image and have gotten it to work as expected, but now I want to set it up where it will work for users linking it in their signatures.

Since it is setup like example.com/file.php?id=1111, many servers wont allow this so I need something that will allow them to put in something like example.com/1111.gif (or .png) and work the same way. How do I do this?

justanewbie

6:28 pm on Oct 1, 2005 (gmt 0)

10+ Year Member



Hi ajs83,

I'm new to mod_rewtire, but I can try to answer you, and if I'm wrong, gurus can correct me :)

So, try to add following thing to the .htaccess

RewriteEngine on
Options +FollowSymLinks
RewriteBase /
RewriteRule ^([0-9]+)\.(gif¦png)$ file.php?id=$1 [L]

And remember to replace this ¦ with correct OR sign

Cheers,
Alex