Solved

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
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…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

911 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

19 Experts available now in Live!

Get 1:1 Help Now