301重定向查询字符串?

时间:2015-06-01 10:48:58

标签: .htaccess url redirect

我需要做一些简单的301重定向,因为我正在使用当前域创建一个新网站。

网站URl的所有内容都以'?'开头。

例如:

Redirect 301 /?q=news http://websitedomain/news/

这导致主页加载的网址仍然相同。

有没有办法解决这个问题?

1 个答案:

答案 0 :(得分:0)

您需要使用mod_rewrite来匹配查询字符串:

public class someclass
{
private bool mbutton2 = false;
private bool mbutton1 = false;

    private void button1_Click(object sender, EventArgs e)
    {
        if (mbutton2)
        {
            richTextBox1.AppendText(String.Format
                      ("Please continue with the midpoint.\n"));
        }
        else
        {
            richTextBox1.AppendText(String.Format
                  ("Type the first set of coordinates in.\n"));
            mbutton1 = true;
        }
    }

    private void button2_Click(object sender, EventArgs e)
    {
          if (mbutton1)
        {
            richTextBox1.AppendText(String.Format
                    ("Please continue with the distance.\n"));

        }
        else
        {
            richTextBox1.AppendText(String.Format
                  ("Type the first set of coordinates in.\n"));
            mbutton2 = true;
        }
    }
}