【发布时间】:2015-01-28 05:18:20
【问题描述】:
我使用 Slim php 框架在 index.php 页面中构建一些操作: 所以这就是我称之为行动的方式:
index.php/action1
$app->get('/action1',function () use ($app){
echo "this is action 1";
});
index.php/action2
$app->get('/action2',function () use ($app){
echo "this is action 2";
});
现在我希望我的 url 变得漂亮,例如当输入 index/action1
,它将重定向到 index.php/action1
请为我提供创建 htaccess 的解决方案
感谢并衷心感谢
【问题讨论】: