在.htaccess中如何获得一个特定的值 [英] In .htaccess how to get a particular value
本文介绍了在.htaccess中如何获得一个特定的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从URL一个特定的值
I am trying to get a specific value from url
就像我的网址
http://www.example.biz/?_escaped_fragment=reader/i/1664
和我想要得到的输出网址是象下面
and I want to get output url is like below
http://www.example.biz/seo/1664
我已经试过这种
I have tried this
RewriteCond^(.*?)_escaped_fragment_=(.*)$
RewriteRule ^(.*)$ seo/%1 [NC]
但输出的URL来了以下
But Output url is coming below
http://www.example.biz/seo/%1?_escaped_fragment=reader/i/1664
我将如何做到这一点?任何帮助AP preciated。
How will I do this? Any help appreciated.
推荐答案
您不是想匹配的什么的在的RewriteCond
。
RewriteCond %{QUERY_STRING} (?:^|&)_escaped_fragment=reader/i/(\d+)$
RewriteRule ^(.*)$ seo/%1 [L]
这篇关于在.htaccess中如何获得一个特定的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文