htaccess将wordpress重定向到index2.php

时间:2014-08-18 11:48:54

标签: php linux wordpress .htaccess tracking

我们在WordPress ada.localhost.com上运行了一个网站

现在,所有基本网址(http://ada.localhost.com/)的请求都必须通过跟踪页面(track.com/c/0912321323/?u=xxx),其中u参数是跟踪用户后重定向用户的位置。

我已经创建了index.php(index2.php)的副本,我想创建htaccess规则以将所有基本网址流量重定向到:

http://track.com/c/0912321323?u=http%3A%2F%2Fada.localhost.com%2Findex2.htmlhttp://ada.localhost.com/index2.php

典型的WP htaccess文件看起来像这样

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

有关如何设置以及WordPress是否允许此配置的任何线索?

1 个答案:

答案 0 :(得分:1)

我发现WordPress无法使用index2.php。 解决方案是编写一个处理它的插件。