通过重定向某些变量的任何页面(Redirect any page passing certain variables)

   IT问题网   2019-08-16 00:00:00

问 题

我把我的网站上的搜索引擎,而搜索框出现在多个不同的页面。 输出看起来是这样的: http://mysite.com/mypage ?.php bluepart =搜索和;关键词=狗和放大器;去=去 我试图做一个.htaccess国防部重写的地方可以通过这些变量中的任何页面重定向到search_results.php。该bluepart =搜索并进入= go会始终是相同的,但关键字可以是任何数字或单词。此外,我的一些网页html的,有些是.php,当我指的是通过变量。任何网页

解决方案

看看的的的rewritecond 选项。它允许你指定一个重写如果一个正规的前pression查询字符串(query_string)相匹配。

标签:过重太重定向某些变量任何页面



分享:

  • 微信
  • QQ好友
  • QQ空间
  • 新浪微博


热门推荐

与RewriteMap指令的MapType DBD问题(Problems with RewriteMap MapType dbd)

problem continuing from another discussion he ...

重写URL时,一个表单提交(rewrite url when a form is submitted)

problem question regarding redirection using htaccess. on ...

从URL preventing直接访问(Preventing direct access from url)

problem in one of my work i need to build a feature for u ...

的.htaccess不会影响到其他文件夹(.htaccess not affecting other folders)

problem i have a .htaccess file that affects my subdomain ...

mod_rewrite的错误:[客户127.0.0.1]文件不存在(mod_rewrite error: [client 127.0.0.1] File does not exist)

problem i want to start using mod_rewrite so i can use fr ...

重写全球htpasswd的密码保护(Overriding global htpasswd password protection)

problem i am testing a drupal site on a development serve ...

PHP路径包含文件(PHP Path to Include Files)

problem i have a site with an index.php. the index.php ha ...

重写URL隐藏的index.php并作出查询不错(Rewriting url to hide index.php and to make query nice)

problem i had developed project with custom mvc architect ...

htaccess的URL路由的PHP MVC?(htaccess URL routing for PHP MVC)

problem i've been searching and have yet to find an artic ...

的.htaccess规则相应的HTTP链接,HTTP和HTTPS重定向到HTTPS?(.Htaccess rules to redirect respective HTTP links to HTTP and HTTPS to HTTPS)

problem first, here's the .htaccess rule i cu ...

使用的.htaccess追加html的URL路径的背后(using .htaccess to append .html behind url path)

problem people are coming into my website like this: sit ...

的.htaccess迫使对SSL错误页面(.htaccess forcing error pages on SSL)

problem i have the following piece of code in ...

可变301重定向URL(301 redirect URL with variable)

problem i want to use htaccess to 301 redirect (not rewri ...

htaccess的重定向example.com/index.php到example.com/home~~V(htaccess redirect example.com/index.php to example.com/home)

problem thanks in advance, i am trying to redirect anyone ...

htaccess的重写规则问题(.htaccess Rewrite Rule Problems)

problem can anyone help me with htaccess rewr ...

htaccess的子域名与所有的变量文件参数(.htaccess sub domain as file parameter with all the variables)

problem i want to make this url redirect usin ...

字preSS定制的mod_rewrite - totalnoob?(Wordpress custom mod_rewrite - totalnoob)

problem i'm trying to make a custom mod_rewrite rule for ...

我怎样才能让我的网址,从这个例子中友好吗?(How can I make my urls friendly from this example)

problem my site currently displays like this (when clicki ...

htaccess的问题强制SSL(.htaccess issue to force SSL)

problem i activated ssl on one of my sites (based on word ...

IfModule不会出现是工作?(IfModule doesn't appear to be working)

problem if i use this: lt;ifmodule mod_rewrite.cgt; rewr ...