从外部站点 (EE) 重定向到 Wordpress 附加一个 ?在 URL 结束时

Redirect to Wordpress from an external site (EE) appends a ? at the end of the URL

我很确定这是我第一次遇到这个问题,所以我不确定去哪里找。

我工作的公司有一个用 Expression Engine 构建的客户站点,他们现在有一个用 Wordpress 构建的新站点。在旧网站上,他们想通过linklink到新的Wordpress网站"Charities"link。

由于 EE 在处理外部 link 方面很糟糕,我决定在 .htaccess 中添加一个重定向。唯一的麻烦是,当单击 link 时,Wordpress 站点会在 URL.

末尾附加一个“/?charities/”

这是 .htaccess 代码...

AddType text/x-component .htc

RewriteEngine On

RewriteBase /

Redirect 301 /charities http://www.retail4charities.co.uk

#Handle comment redirection
RewriteCond %{THE_REQUEST} !^POST
RewriteRule ^template_group/?(.*)$ / [R=301,L]

#Handle removal of index.php and template group from EE URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond  !^(images|logocms|themes|index\.php|admin\.php) [NC]
RewriteCond %{QUERY_STRING} !^ACT=
RewriteRule ^(.*)$ index.php? [L]

有关工作示例,请转到 http://kudos-software.co.uk 并单击慈善机构 link 以查看发生了什么。

如有任何帮助,我们将不胜感激。

最好使用 mod_rewrite。将那行换成这行:

RewriteRule ^charities$ http://www.retail4charities.co.uk [R=302,L]

将 302 更改为 301 以使重定向永久(缓存)。