首页 > 解决方案 > 分页网址上的友好网址?

问题描述

我有这个

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

但这不起作用,请帮助我。

标签: .htaccessurlseo

解决方案


您缺少脚本扩展的page一部分

RewriteRule ^index.php/page/([0-9]+)$ index.php?page=$1

推荐阅读