Wordpress网址重写与位置标题

时间:2014-07-16 22:43:16

标签: php wordpress .htaccess iframe

我使用iframe将standlone php文件或其他网站加载到wordpress中,但我无法将此工作用于其他网站。我怎么能让它发挥作用?

我使用以下htaccess排除了app.php:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)\.html$ wp-content/themes/lily/app.php [NC]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]
</IfModule>

然后在app.php中:

<?php
    $appid = strtolower($_GET['appid']);
    if($appid && file_exists($appid.'/'.$appid.'.php')){
        header('Location: wp-content/themes/lily/apps/'.$appid.'/'.$appid.'.html');
    }elseif($appid && $appid == 'rappels'){
        header('Location:http://google.fr'); // for exemple
    } else {
    header('Location: wp-content/themes/lily/includes/noapp.php');
 } ?>

我使用js生成iframe。

0 个答案:

没有答案
相关问题