.htaccess 需要3000页的htaccess重定向帮助吗

.htaccess 需要3000页的htaccess重定向帮助吗,.htaccess,http-status-code-301,.htaccess,Http Status Code 301,需要帮助,因为我们有一个joomla网站,1.5岁,现在当我们做搜索引擎优化审计,令人惊讶地发现超过3000页的url是未定义的 ex-1 不正确的url: www.example.com/undefined/index.php?option=com\u usedcar&view=search&Itemid=3 正确的url- www.example.com/index.php?option=com\u usedcar&view=search&Itemid=3 ex-2不正确的url: www.

需要帮助,因为我们有一个joomla网站,1.5岁,现在当我们做搜索引擎优化审计,令人惊讶地发现超过3000页的url是未定义的

ex-1 不正确的url:

www.example.com/undefined/index.php?option=com\u usedcar&view=search&Itemid=3

正确的url-

www.example.com/index.php?option=com\u usedcar&view=search&Itemid=3

ex-2不正确的url:

www.example.com/undefined/index.php?option=com\u forms&view=pages&layout=shop&Itemid=2

正确的url-

www.example.com/index.php?option=com\u forms&view=pages&layout=shop&Itemid=2

术语“未定义”只是把事情搞砸了,导致了所有重复的内容 有没有办法对未定义到未定义的页面执行301重定向,而url的其余部分保持不变

谢谢,期待着

更新

更新,我已经尝试使用此代码,但仍然无法达到预期的结果

  RewriteEngine On
  RewriteBase /
  RewriteCond %{REQUEST_URI} ^.*/undefined.*$
  RewriteRule .*  /     [L,R=301,DPI]
通过在HTC中使用上述代码访问原始url-

  http://www.xxx.com/undefined/index.php?option=com_easyblog&view=entry&id=42&Itemid=91
已更改为新url-

   http://www.xxx.com/?option=com_easyblog&view=entry&id=42&Itemid=91
如果您看到,虽然未定义的被删除,但新的url缺少实际正确url中的index.php,有人能帮上忙吗。。thnx

尝试了hit n试验 用index.php替换*似乎解决了这个问题