簡體   English   中英

Phpthumb與.htaccess的不存在的URL重定向

[英]Phpthumb non-exisiting url redirection with .htaccess

如果在網址“ src = nothere”處指定的圖像不是我需要重新定向為不存在的圖像或類似圖像的實際路徑,是否可以重定向? 我在決定要在這里使用正則表達式時遇到問題嗎? 以及如何知道它是否不存在。

https://www.temptemp.com/PhpThumb/phpThumb.php?src=nothere&w=140px&h=120px&q=100 

謝謝

加安

您正在使用phpThumb類嗎?

phpThumb.config.php

    // * Error message configuration
$PHPTHUMB_CONFIG['error_image_width']           = 400;      // default width for error images
$PHPTHUMB_CONFIG['error_image_height']          = 100;      // default height for error images
$PHPTHUMB_CONFIG['error_message_image_default'] = '';       // Set this to the name of a generic error image (e.g. '/images/error.png') that you want displayed in place of any error message that may occur. This setting is overridden by the 'err' parameter, which does the same thing.
$PHPTHUMB_CONFIG['error_bgcolor']               = 'CCCCFF'; // background color of error message images
$PHPTHUMB_CONFIG['error_textcolor']             = 'FF0000'; // color of text in error messages
$PHPTHUMB_CONFIG['error_fontsize']              = 1;        // size of text in error messages, from 1 (smallest) to 5 (largest)
$PHPTHUMB_CONFIG['error_die_on_error']          = true;     // die with error message on any fatal error (recommended with standalone phpThumb.php)
$PHPTHUMB_CONFIG['error_silent_die_on_error']   = false;    // simply die with no output of any kind on fatal errors (not recommended)
$PHPTHUMB_CONFIG['error_die_on_source_failure'] = true;     // die with error message if source image cannot be processed by phpThumb() (usually because source image is corrupt in some way). If false the source image will be passed through unprocessed, if true (default) an error message will be displayed.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM