由网友(余生一个你)分享简介:我想重定向在.htaccess文件的单个URL以重定向:I am trying to redirect a single URL in a .htaccess file with Redirect:Redirect 301 /index2.php?option=com_rss&feed=RSS2.0&no_html...
我想重定向在.htaccess文件的单个URL以重定向
:
I am trying to redirect a single URL in a .htaccess file with Redirect
:
Redirect 301 /index2.php?option=com_rss&feed=RSS2.0&no_html=1 /something/somethingelse/
我有一帮其工作中使用的目录结构的网址其它类似的规则,但是这一次拒绝得到处理。
I have a bunch of other similar rules which work using directory structure URLs, but this one refuses to get processed.
Redirect 301 /old/url/ /new/url/
我必须做什么特别的?
Do I have to do anything special?
谢谢!
推荐答案
通过 重定向
你可以为网址只考路径的,或者更具体地说,URL路径prefixes但不为URL查询。但你可以做到这一点 mod_rewrite的:
With Redirect
you can only test for URL paths, or more specifically, URL path prefixes but not for the URL query. But you can do so with mod_rewrite:
RewriteEngine on
RewriteCond %{QUERY_STRING} =option=com_rss&feed=RSS2.0&no_html=1
RewriteRule ^index2.php$ /something/somethingelse/? [L,R=301]
相关推荐
最新文章