首页 > 解决方案 > 当我在自定义页面 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.htaccess

解决方案


推荐阅读