如何重定向所有主要饲料除了一些饲料到Feedburner的? [英] How to redirect main all feed to feedburner except some feeds?

查看:112
本文介绍了如何重定向所有主要饲料除了一些饲料到Feedburner的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想重定向我的博客的FeedBurner的主要饲料,但我不想重定向像其他饲料:
myword pressblog.ir /料/?post_type =岗位
要么
myword pressblog.ir /料/?post_type日常=

我已经配置这种方式在Apache的.htaccess,但它不工作!任何人能帮助我吗?

 < IfModule mod_rewrite.c>
RewriteEngine叙述上
的RewriteCond%{HTTP_USER_AGENT}!FeedBurner的[NC]
的RewriteCond%{HTTP_USER_AGENT}!供稿验证器[NC]
的RewriteCond%{REQUEST_URI}!^ /料/ \\?后。* $ [NC]
重写规则^(。*)$ http://feeds.khaja​​vi.ir/khaja​​vi [R = 302,NC,L]
< / IfModule>
#BEGIN字preSS
< IfModule mod_rewrite.c>
RewriteEngine叙述在
的RewriteBase /
重写规则^指数\\ $的.php - [L]
的RewriteCond%{} REQUEST_FILENAME!-f
的RewriteCond%{} REQUEST_FILENAME!-d
重写规则。的index.php [L]
< / IfModule>
#结束字preSS


解决方案

您不能匹配在%{REQUEST_URI}查询字符串,你需要使用在%{QUERY_STRING} VAR:

  RewriteEngine叙述上
的RewriteCond%{HTTP_USER_AGENT}!FeedBurner的[NC]
的RewriteCond%{HTTP_USER_AGENT}!供稿验证器[NC]
的RewriteCond%{REQUEST_URI}!^ /料/ [NC]
的RewriteCond%{QUERY_STRING} ^!职务
重写规则^(。*)$ http://feeds.khaja​​vi.ir/khaja​​vi [R = 302,NC,L]

I want to redirect main feed of my blog to feedburner but I don't want to redirect other feeds like: mywordpressblog.ir/feed/?post_type=post or mywordpressblog.ir/feed/?post_type=daily

I have configured the apache .htaccess in this way, but it doesn't work! Any one could help me?

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} !FeedBurner [NC]
RewriteCond %{HTTP_USER_AGENT} !FeedValidator [NC]
RewriteCond %{REQUEST_URI} !^/feed/\?post.*$ [NC]
RewriteRule ^(.*)$ http://feeds.khajavi.ir/khajavi  [R=302,NC,L]
</IfModule>


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

解决方案

You can't match against the query string in the %{REQUEST_URI}, you need to use the %{QUERY_STRING} var:

RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} !FeedBurner [NC]
RewriteCond %{HTTP_USER_AGENT} !FeedValidator [NC]
RewriteCond %{REQUEST_URI} !^/feed/ [NC]
RewriteCond %{QUERY_STRING} !^post
RewriteRule ^(.*)$ http://feeds.khajavi.ir/khajavi  [R=302,NC,L]

这篇关于如何重定向所有主要饲料除了一些饲料到Feedburner的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆