Forum Moderators: phranque

Message Too Old, No Replies

noob need rewrite help

         

C1hundred

8:13 pm on Jun 24, 2005 (gmt 0)



Basically my ISP has moved from a FreeBSD cgi server to a Debian server.

I have a php script that makes a png image that I use as a banner/signature, but to allow phpBB to use it as a sig I had to use

<snip>

The problem is that the new server doesnt like it.

Someone suggested using rewrite to make <snip> go to <snip> and they gave me this -

RewriteEngine On
RewriteRule ^C100/np-img.png$ C100/np-img.php [L]

but it doesnt work

any idea?

[edited by: Woz at 10:40 pm (utc) on June 24, 2005]
[edit reason] No URLs please, see Tos#13 [/edit]

Birdman

3:14 am on Jun 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Firstly, welcome to WW!

You need to escape the period(.) in the left side of the rule:

RewriteRule ^C100/np-img\.png$ C100/np-img.php [L]

There are a set of reserved characters, which are used for regular expression matching (ie. . { % ^ * etc...). If you want to actually match one of those chars, you must escape it (ie. \*).

Cheers!

[edited by: jdMorgan at 9:40 pm (utc) on July 5, 2005]
[edit reason] Corrected formatting. [/edit]