php - 当我在自定义页面 PHP 中使用 htaccess 文件时出现未识别的索引
问题描述
我正在尝试使用 . htaccess 文件。的代码。htaccess 文件如下
RewriteEngine On
RewriteRule ^post/([a-zA-Z0-9-/]+)$ post.php?post_url=$1
RewriteRule ^post/([a-zA-Z-0-9-]+)/ post.php?post_url=$1
问题是它给出了 $_GET 变量中 post_url 链接的未识别索引错误。
解决方案
推荐阅读
- php - view()->render() 有什么用?
- abap - 等待
在ABAP - php - 如何使用 PHP Codeigniter 框架在浏览器中查看 pdf 文件
- java - 如何在 Java 中测试子类是否相等?
- c# - SwashBuggler.swaggerDocument 未能创建文档
- python-3.x - 如何将多个 ipynb 文件(在 GCP 中)转换为 py 文件
- sympy - 如何检查符号表达式是否有理?
- python - 如何在 KDB 中以二进制格式保存列表/矩阵?
- python - 与 MySQL 连接的 pyqt5 是否可以在没有 MySQL 的其他计算机上工作?
- c++ - `struct A_API B{}` 是什么意思?