由网友(伤感在游骋)分享简介:在oldtoys需要301重定向帮助所有字符串匹配'开始'参数生成的不正确的URL http://www.abc.com/index.php?option=com_oldtoys&view=category&Itemid=2&start=45&limitstart=300http://www.abc.com/ind...![301重定向怎么做](https://p.xsw88.cn/allimgs/daicuo/20230902/658.png)
在oldtoys需要301重定向帮助所有字符串匹配'开始'参数
生成的不正确的URL
http://www.abc.com/index.php?option=com_oldtoys&view=category&Itemid=2&start=45&limitstart=300 http://www.abc.com/index.php?option=com_oldtoys&view=category&Itemid=2&start=30&limitstart=275 http://www.abc.com/index.php?option=com_oldtoys&view=category&Itemid=2&start=15&limitstart=250![301重定向怎么做](https://p.xsw88.cn/allimgs/daicuo/20230902/658.png)
正确的网址
http://www.abc.com/index.php?option=com_oldtoys&view=category&Itemid=2&limitstart=300 http://www.abc.com/index.php?option=com_oldtoys&view=category&Itemid=2&limitstart=275 http://www.abc.com/index.php?option=com_oldtoys&view=category&Itemid=2&limitstart=250这仅适用于旧玩具部件 可以在其上有人帮忙
解决方案使用mod_rewrite:
RewriteEngine叙述上
的RewriteCond%{QUERY_STRING} ^(选项= com_oldtoys及放大器; *)及开始= [0-9] + $(*)。
重写规则^指数 .PHP $ /index.php?%1%2 [L,R = 301]
Need help on 301 redirection for all string matches 'start' parameter in oldtoys
Incorrect URL been generated
http://www.abc.com/index.php?option=com_oldtoys&view=category&Itemid=2&start=45&limitstart=300
http://www.abc.com/index.php?option=com_oldtoys&view=category&Itemid=2&start=30&limitstart=275
http://www.abc.com/index.php?option=com_oldtoys&view=category&Itemid=2&start=15&limitstart=250
Correct URL
http://www.abc.com/index.php?option=com_oldtoys&view=category&Itemid=2&limitstart=300
http://www.abc.com/index.php?option=com_oldtoys&view=category&Itemid=2&limitstart=275
http://www.abc.com/index.php?option=com_oldtoys&view=category&Itemid=2&limitstart=250
This only pertains to old toys component Can someone help on it
解决方案Using mod_rewrite:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(option=com_oldtoys&.*)&start=[0-9]+(.*)$
RewriteRule ^index.php$ /index.php?%1%2 [L,R=301]
相关推荐
最新文章