0
我需要用Timthumb重寫我的圖像網址以獲得更好的SEO。htaccess - 圖像URL重寫
我(對笨),它的工作原理是htaccess的文件,但是當我過去的URL重寫(ES http://www.example.com/products/loremipsum-450x600.jpg)重定向到:http://www.example.com/resize/timthumb.php?src=http://www.moveshop.com/uploads/loremipsum.jpg&w=450&h=600
是否有可能重寫不重定向? 感謝
- 我htaccess文件是:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^(products)/(.*)-([0-9]{1,4})x([0-9]{1,4}).(jpg) http://www.example.com/resize/timthumb.php?src=http://www.example.com/uploads/$2.$5&w=$3&h=$4 [R=301,L]
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
只需在規則末尾刪除「R = 301」即可。 –
@HashemQolami該規則的目標的'http://'部分隱式重定向 –
@JonLin啊沒錯。 –