.htaccess - 分页网址上的友好网址?
问题描述
我有这个
http://localhost/index.php?page=1
我想展示这个
http://localhost/index.php/page/1
我现在有 .htaccess 这段代码:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^index/([0-9]+)$ index.php?page=$1
但这不起作用,请帮助我。
解决方案
您缺少脚本扩展的page
一部分
RewriteRule ^index.php/page/([0-9]+)$ index.php?page=$1
推荐阅读
- unreal-engine4 - 错误:无法加载游戏模块
- mysql - 如何将 MySQL MEMORY 存储引擎与 Knex 一起使用?
- javascript - 如何定义从 json 到 js 的 var?
- r - 使用 R 在组中创建具有条件的新数据框
- c# - Css 类不适用于中继器中的最后一个元素
- python - 您可以将 sha256 两次应用于单个字符串吗?
- laravel - Laravel Nova - 前端的输出形式?
- hadoop - 哪个版本的sqoop兼容hadoop 3.0
- react-native - 反应原生参考子失败
- java - 如何修复连接到 sql server 2012 错误?