.htaccess - 分页网址上的友好网址?

标签 .htaccess url seo

我有这个

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

关于.htaccess - 分页网址上的友好网址?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52787315/

相关文章:

FileZilla 的 Java FTP 连接问题

search - 将旧网站转移到新框架网站并托管后如何修复谷歌搜索引擎优化?

linux - 如何在没有 SSL 证书的情况下将 HTTPS 重定向到 HTTP

php - 使用 .htaccess 将所有 URL 定向到一页

apache - HTACCESS 重定向

url - ModX Revo : Update sites base URL?

php - 如何在php中检查url是否存在

Magento - 限制 seo 的标题长度

seo - anchor 内的 H3 和 P 标签,对 SEO 有影响吗?

linux - htaccess 上带有 % 百分比标记的 URL 的 301 重定向