.htaccess隐藏URL 301重定向的字符串(包括特殊字符?)

时间:2015-11-09 02:33:04

标签: php apache .htaccess mod-rewrite redirect

我的网站刚刚使用htaccess从HTTP重定向到HTTPS。既然网站显示index.php?在URL结构中。我不确定为什么这样做。

最初显示如下: https://www.example.com.au/index.php?/rest-of-URL

在htaccess中使用以下代码我可以将其限制为:https://www.example.com.au/?/rest-of-URL

RewriteBase /
RewriteCond %{THE_REQUEST} ^GET.*index\.php\?/ [NC]
RewriteRule (.*?)index\.php? / [R=301,NE,L]

我需要使用htaccess

从网址中删除?/

请有人帮忙:(

1 个答案:

答案 0 :(得分:1)

我通过更改所有网页的内部链接来解决此问题。谢谢大家的帮助。如果你有一个通过htaccess文件实际修复它的解决方案,我会非常感兴趣。感谢

相关问题