我期待一个问题
header('Location:http://www.google.com');
exit;
它会将我重定向到任何类型的指定网址,但末尾带有“#”。请帮助我找到解决方案。
其他信息:
- php 5.3
- WordPress 3.9.2。
ps 使用header()
,wp_safe_redirect()
并wp_redirect()
返回相同的问题。使用标题来调查其初始声明中的问题。
更新:
我在 Chrome 和 FF 中尝试过。
最后只有“#”。
访问:
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L] # <- For security porposes
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
可能是一个插件,是的。请让我知道您的建议是什么。我的意思是插件如何影响服务器配置。
PS2 可能是服务器端的问题?我应该联系托管服务提供商吗?
:
PS3 我已经尝试了所有可能的 URL 类型,并且在和之间没有空格url_string
PS4 代码是标题前的简单 if-else 组合。