【问题标题】:Why my url redirect to another one?为什么我的网址重定向到另一个?
【发布时间】:2011-09-14 16:42:43
【问题描述】:

我设置了一个规则来重写一些链接。

这个网址

http://www.steffiandmihanta.com/images/servane/ms-servane-5_n_nette_h540.jpg 

重定向到

http://www.steffiandmihanta.com/main/wp-content/themes/MS-MangoBerry/timthumb.php?src=https://s3-eu-west-1.amazonaws.com/steffiandmihanta/main/wp-content/gallery/servane/ms-servane-5_n_nette.jpg&q=100&h=540

我的 htaccess 是:

RewriteRule ^images/(.*)_h(.*).jpg$ http://www.steffiandmihanta.com/main/wp-content/themes/MS-MangoBerry/timthumb.php?src=https://s3-eu-west-1.amazonaws.com/steffiandmihanta/main/wp-content/gallery/$1.jpg&q=100&h=$2 [NC,L]

如何修改它以不重定向到丑陋的网址?

谢谢

【问题讨论】:

    标签: .htaccess url redirect


    【解决方案1】:

    也许你的意思是这样的:

    RewriteRule ^images/(.*)_h(.*).jpg$ http://www.steffiandmihanta.com/main/wp-content/themes/MS-MangoBerry/timthumb.php?src=https://s3-eu-west-1.amazonaws.com/steffiandmihanta/main/wp-content/gallery/$1.jpg&q=100&h=$2 [L,QSA]
    

    【讨论】:

    • 我将 [NC,L] 更改为 [L,QSA] 但漂亮的链接总是重定向到丑陋的链接
    猜你喜欢
    • 1970-01-01
    • 2023-01-15
    • 2016-03-31
    • 2020-09-29
    • 2016-11-05
    • 2014-07-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多