Solved

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

Posted on 2008-06-18
3
588 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
  • 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now