【发布时间】:2015-12-08 20:14:09
【问题描述】:
我尝试使用 timthumb 库调整图像大小。
我可以通过以下网址直接使用
http://localhost/study/server/resize/thumb.php?src=http://localhost/study/server/product/1/1/orig-1.jpg&w=160&h=130
而且效果很好。
但是当我像这样重写我的网址时
http://localhost/study/server/resize/160x130/r/product/1/1/orig-1.jpg
并添加
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/(resize) [NC]
RewriteRule ^resize/(.*)x(.*)/r/(.*) resize/thumb.php?src=http://localhost/study/server/$3&h=$2&w=$1&c=1
</IfModule>
不幸的是,这条规则返回 404 错误
【问题讨论】:
-
什么服务器可以使用 wamp 或 xammp...?
-
ubuntu apache2 httpd
标签: php .htaccess url-rewriting