[英]htaccess remove string from url by 301 redirect
需要帮助以从网址中删除此字符串
index....</div></images/myblog_images/978
网址错误
http://www.abc.com/index....%3C/div%3E%3C/images/myblog_images/978/index.php?option=com_news&view=detail&n_id=20&Itemid=4
正确的网址
http://www.abc.com/index.php?option=com_news&view=detail&n_id=20&Itemid=4
非常感谢
编辑
您好Anubhav在应用htaccess条件时-网址已更改为
http://www.abc.com/home/truecar7/public_html/index.php?option=com_news&view=detail&n_id=20&Itemid=4
您可以尝试以下代码:
RewriteRule ^.+?(index\.php)$ /$1 [L,NC,R=301]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.