需要帮助,因为我们有一个joomla网站,1.5岁的时候,我们正在做seo审计,发现超过3000页的url在里面没有定义。
前-1错误网址:
www.example.com/undefined/index.php?option=com_usedcar&view=search&Itemid=3
正确的网址-
www.example.com/index.php?option=com_usedcar&view=search&Itemid=3
前-2错误网址:
www.example.com/undefined/index.php?option=com_forms&view=pages&layout=shop&Itemid=2
正确的网址-
www.example.com/index.php?option=com_forms&view=pages&layout=shop&Itemid=2
术语‘未定义’只是搞砸了,因为它导致了所有重复的内容,对于未定义的页面是否有任何方法重定向到没有定义的页面,而url的其余部分则保持不变?
谢谢,期待着
更新
更新,我尝试使用这段代码,但仍然无法达到预期的结果
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^.*/undefined.*$
RewriteRule .* / [L,R=301,DPI]通过在htaccess中使用上述代码,可以访问原始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
发布于 2013-01-27 02:54:18
尝试过的hit n审判似乎通过用index.php替换*解决了
https://stackoverflow.com/questions/14539980
复制相似问题