Solved

Help creating a mod_rewrite in lighttpd (phpThumb and Lighttpd related)

Posted on 2008-06-18
3
594 Views
Last Modified: 2012-06-21
Hello,
First, here are a thread of the problem I need to fix:
http://support.silisoftware.com/phpBB3/viewtopic.php?f=2&t=11
http://forum.lighttpd.net/topic/77623

The situation I have is that I'm trying to use phpThumb by calling the images this way:
http://domain/_images/thumbs/phpThumb.php/320;/_images/200806181018580.jpg

the above way works fine in Apache, but I don't know why it doesn't work that way in lighttpd. It only works the standard way like this:
http://domain/_images/thumbs/phpThumb.php?src=/_images/200806181018580.jpg&w=320

so I think that maybe using the mod_rewrite rule could be a way to work around it. Bu I have no knowledge at all of how to do this.

So basically what I'm looking for is a way to call the phpThumb the way its shown in the first example by setting a mod_rewrite rule for it.

I need it ASAP.

Thanks,


PS: Why there's no category zone for lighttpd under web servers in EE?
0
Comment
Question by:cmercado_miranda
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 49

Expert Comment

by:Roonaan
ID: 21820152
LightHttp does not have the multiviews like apache has. There are workarounds.


With a .htaccess file in /thumbs/ you can have
RewriteEngine On
RewriteRule 'phpThumb.php/(.*)$ phpThumb.php?$1 [L]
0
 

Author Comment

by:cmercado_miranda
ID: 21821283
Do I need to change something in lighttpd config to .htaccess to work?

I created that file under the thumbs folder, but it seems that is not doing anything.

Thanks
0
 

Accepted Solution

by:
cmercado_miranda earned 0 total points
ID: 21822497
Fixed it thanks to James, the developer of phpThumb. :)

Just needed to add this line to the configuration under fastcgi.server and it fixed it:
"broken-scriptfilename" => "enable"

Thanks Roonaan for your help too.... have a nice day.
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question