51 lines
1.5 KiB
PHP
Executable File
51 lines
1.5 KiB
PHP
Executable File
<?php
|
|
switch($request_uri){
|
|
#############################
|
|
case '/blog/md/';
|
|
include '/var/www/owp/open-ww3-project-ww3-tw/src/md/inite.php';
|
|
exit(); // 执行成功立即结束
|
|
break;
|
|
|
|
case '/blog/md';
|
|
header("Location: https://ww3.tw/blog/md/");
|
|
exit(); // 执行成功立即结束
|
|
break;
|
|
##############################
|
|
|
|
case '/blog/image';
|
|
include '/var/www/owp/open-ww3-project-ww3-tw/src/image/s/2025/7/30/index.php';
|
|
exit(); // 执行成功立即结束
|
|
break;
|
|
|
|
case '/blog/md/src/php-markdown/';
|
|
header("Location: https://ww3.tw/blog/md/");
|
|
exit(); // 执行成功立即结束
|
|
break;
|
|
|
|
case '/blog/md/post/';
|
|
include '../src/views/post.php';
|
|
exit(); // 执行成功立即结束
|
|
break;
|
|
|
|
case '/blog/md/post/s/2025/07/30/';
|
|
header("Location: https://ww3.tw/blog/md/post/s/1");
|
|
exit(); // 执行成功立即结束
|
|
break;
|
|
|
|
case '/blog/md/post/s/2025/07/30';
|
|
header("Location: https://ww3.tw/blog/md/post/s/1");
|
|
exit(); // 执行成功立即结束
|
|
break;
|
|
|
|
}
|
|
|
|
$post_id = null; // 初始化 post_id 变量
|
|
switch(true){
|
|
case preg_match('/^\/blog\/md\/post\/s\/(\d+)$/', $request_uri, $matches):
|
|
$post_id = (int)$matches[1];
|
|
include "../src/views/posts.php";
|
|
exit(); // 执行成功立即结束
|
|
break;
|
|
|
|
}
|