【发布时间】:2021-12-19 13:42:18
【问题描述】:
最近我一直在尝试一些东西,并试图添加一个像 wordpress 这样的主题系统(而不是创建一个全新的 wordpress),只是试图实现他们的登录。
我有这个 index.php 文件
<?php
include('core/core.php');
echo $_GET['id'];
$currentTheme = getPageData() -> theme_selected;
include("jtq-theme/" . $currentTheme . "/index.php");
?>
所以这基本上在主页上显示http://xxxxx/jtq-theme/default/index.php。 所以现在当一个人进入关于我们的页面时。
所以 index.php 是显示所有内容的主文件。 并且关于我们的页面正在使用逻辑显示
http://xxxx/index.php?page=about_us
但我希望网址是
http://xxxx/about_us
并且文件应该从 http://xxxx/jtq-theme/default/about_us.php
在这种情况下我应该如何编写 .htaccess?
【问题讨论】: