我正在使用 osCommerce 平台。我在 Chrome 浏览器中注意到; URL 不干净并且有像#VTkfzCGqqkow 这样的尾随字符串,特别是在产品页面上 例如 www.example.com/product-name.html#VTkfzCGqqkow 虽然我需要像这样的干净网址 www.example.com/product-name.html
请建议我修改 .htaccess 文件或 osCommercer 文件的解决方案。
谢谢。
最佳答案
看看这个:
$url = 'www.example.com/product-name.html#VTkfzCGqqkow ';
echo var_export(parse_url($url));
您使用:
$url = parse_url($url,PHP_URL_PATH);
关于php - 如何从 URL 中删除这种类型的字符串 #VTkfzCGqqkow,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29829753/